Commit 7075ba79 authored by Lucas Stach's avatar Lucas Stach Committed by Philipp Zabel

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: default avatarLucas Stach <l.stach@pengutronix.de>
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
parent 3df07390
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment