Re: [PATCH 2/5] drm/imx: imx-ldb: check return code on panel attach

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Freitag, den 17.06.2016, 12:13 +0200 schrieb Lucas Stach:
> Check the return code on panel attach. Avoids a kernel crash later
> on if the attach failed.
> 
> Signed-off-by: Lucas Stach <l.stach@xxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/imx/imx-ldb.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c
> index beff793bb717..48166df14042 100644
> --- a/drivers/gpu/drm/imx/imx-ldb.c
> +++ b/drivers/gpu/drm/imx/imx-ldb.c
> @@ -427,8 +427,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,
>  			&imx_ldb_ch->encoder);

Applied, thanks.

regards
Philipp

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux