Skip to content
Snippets Groups Projects
Commit 701c12a6 authored by Fancy Fang's avatar Fancy Fang Committed by Leonard Crestez
Browse files

MLK-21317 drm/imx: core: fix dangling pointer use of 'drm_device'


When any fail happens during master's '>bind()' function, the
drm_device' pointer data which is set to the device driver data
will be put and freed. But if later, system suspend is called,
the freed 'drm_device' pointer will be used again.

Signed-off-by: default avatarFancy Fang <chen.fang@nxp.com>
parent fe803fb2
No related branches found
No related tags found
No related merge requests found
...@@ -247,8 +247,6 @@ static int imx_drm_bind(struct device *dev) ...@@ -247,8 +247,6 @@ static int imx_drm_bind(struct device *dev)
if (ret) if (ret)
goto err_kms; goto err_kms;
dev_set_drvdata(dev, drm);
/* Now try and bind all our sub-components */ /* Now try and bind all our sub-components */
ret = component_bind_all(dev, drm); ret = component_bind_all(dev, drm);
if (ret) if (ret)
...@@ -282,6 +280,8 @@ static int imx_drm_bind(struct device *dev) ...@@ -282,6 +280,8 @@ static int imx_drm_bind(struct device *dev)
if (ret) if (ret)
goto err_fbhelper; goto err_fbhelper;
dev_set_drvdata(dev, drm);
return 0; return 0;
err_fbhelper: err_fbhelper:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment