From 075ec22212ef6fda8d054a1aece866ec8248c75b Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Sat, 26 Oct 2019 17:21:12 +0200 Subject: drm/tiny/st7735r: set drvdata before registering Otherwise things might go boom. Not a big chance of that happening since we don't implement suspend/resume support. --- drivers/gpu/drm/tiny/st7735r.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/st7735r.c b/drivers/gpu/drm/tiny/st7735r.c index 477eb36fbb70..448dcddc218b 100644 --- a/drivers/gpu/drm/tiny/st7735r.c +++ b/drivers/gpu/drm/tiny/st7735r.c @@ -235,12 +235,12 @@ static int st7735r_probe(struct spi_device *spi) drm_mode_config_reset(drm); + spi_set_drvdata(spi, drm); + ret = drm_dev_register(drm, 0); if (ret) return ret; - spi_set_drvdata(spi, drm); - drm_fbdev_generic_setup(drm, 0); return 0; -- cgit v1.2.3