diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2016-06-16 11:12:13 +0200 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2016-07-12 18:24:29 +0200 |
commit | 7075ba7942b80704588cc60bce945519b0302ced (patch) | |
tree | 06fa284200d9dc8816970c113d82b520dd54ffc6 /drivers/gpu/drm/imx/imx-ldb.c | |
parent | 3df0739052c23989b441883fa251a0988f75c0f3 (diff) | |
download | linux-7075ba7942b80704588cc60bce945519b0302ced.tar.bz2 |
drm/imx: imx-ldb: check return code on panel attach
Check the return code on panel attach. Avoids a kernel crash later
on if the attach failed.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/imx/imx-ldb.c')
-rw-r--r-- | drivers/gpu/drm/imx/imx-ldb.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c index 00d67b5407d8..5d2831dfb8b9 100644 --- a/drivers/gpu/drm/imx/imx-ldb.c +++ b/drivers/gpu/drm/imx/imx-ldb.c @@ -474,8 +474,12 @@ static int imx_ldb_register(struct drm_device *drm, drm_connector_init(drm, &imx_ldb_ch->connector, &imx_ldb_connector_funcs, DRM_MODE_CONNECTOR_LVDS); - if (imx_ldb_ch->panel) - drm_panel_attach(imx_ldb_ch->panel, &imx_ldb_ch->connector); + if (imx_ldb_ch->panel) { + ret = drm_panel_attach(imx_ldb_ch->panel, + &imx_ldb_ch->connector); + if (ret) + return ret; + } drm_mode_connector_attach_encoder(&imx_ldb_ch->connector, encoder); |