diff options
author | Liu Ying <victor.liu@nxp.com> | 2017-11-14 13:18:46 +0800 |
---|---|---|
committer | Liu Ying <victor.liu@nxp.com> | 2017-11-15 13:02:58 +0800 |
commit | 4e4ca7be48dbd753d6f4a68c1eb2a829d48f7655 (patch) | |
tree | c2e93ae74801e1daa4ac292f289eaf991a9b31b2 | |
parent | b7c33a0e4021fda663241eccdbd445fd5a455ace (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>
(cherry picked from commit a4562fba7d324ae450824fc25e70f11f1133ef66)
-rw-r--r-- | drivers/gpu/drm/imx/imx-drm-core.c | 1 |
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 2fb93cf1ba17..ee23eb37e8bb 100644 --- a/drivers/gpu/drm/imx/imx-drm-core.c +++ b/drivers/gpu/drm/imx/imx-drm-core.c @@ -427,6 +427,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); |