summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/imx/imx-drm-core.c
diff options
context:
space:
mode:
authorLiu Ying <victor.liu@nxp.com>2017-11-14 13:18:46 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit8729505987fc7dc9ae366316941a6b58177c372b (patch)
treeb2649874f2828b420a773984846e715c147a4761 /drivers/gpu/drm/imx/imx-drm-core.c
parent7d92dc15d4850fc3c4488dee4ffd2ac235ebc783 (diff)
MLK-16813 drm/imx: core: Set driver data to NULL when we bailout from ->bind()
We need to set driver data to NULL when we bailout from ->bind(), otherwise it would be leaked to the system power management operations and cause invalid driver data being used there. Reported-by: Anson Huang <Anson.Huang@nxp.com> Fixes: 54db5decce17 ("drm/imx: drop deprecated load/unload drm_driver ops") Signed-off-by: Liu Ying <victor.liu@nxp.com>
Diffstat (limited to 'drivers/gpu/drm/imx/imx-drm-core.c')
-rw-r--r--drivers/gpu/drm/imx/imx-drm-core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c
index cb830836979b..916c9f5c57ec 100644
--- a/drivers/gpu/drm/imx/imx-drm-core.c
+++ b/drivers/gpu/drm/imx/imx-drm-core.c
@@ -432,6 +432,7 @@ err_unbind:
#endif
component_unbind_all(drm->dev, drm);
err_vblank:
+ dev_set_drvdata(dev, NULL);
drm_vblank_cleanup(drm);
err_kms:
drm_mode_config_cleanup(drm);