From 37d2a04b723d8e213e8f71d8eef047469f397a24 Mon Sep 17 00:00:00 2001 From: Liu Ying Date: Tue, 14 Nov 2017 13:18:46 +0800 Subject: [PATCH] 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 Fixes: 54db5decce17 ("drm/imx: drop deprecated load/unload drm_driver ops") Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/imx-drm-core.c | 1 + 1 file changed, 1 insertion(+) 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); -- 2.17.1