Re: [PATCH] drm/exynos: checking for NULL instead of IS_ERR()

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

 



On 13.10.2018 12:21, Dan Carpenter wrote:
> The of_drm_find_panel() function returns error pointers and never NULL
> but we the driver assumes that ->panel is NULL when it's not present.
> 
> Fixes: 6afb7721e2a0 ("drm/exynos: move connector creation to attach callback")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

Thanks for spotting it (and sorry for previous reply mistake).

Reviewed-by: Andrzej Hajda <a.hajda@xxxxxxxxxxx>

 --
Regards
Andrzej


> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index 07af7758066d..32f256749789 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -1527,7 +1527,9 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
>  		}
>  
>  		dsi->panel = of_drm_find_panel(device->dev.of_node);
> -		if (dsi->panel) {
> +		if (IS_ERR(dsi->panel)) {
> +			dsi->panel = NULL;
> +		} else {
>  			drm_panel_attach(dsi->panel, &dsi->connector);
>  			dsi->connector.status = connector_status_connected;
>  		}
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux