[patch] drm/exynos: IS_ERR() vs NULL bug

Inki Dae inki.dae at samsung.com
Fri Mar 6 04:49:35 PST 2015


On 2015년 02월 20일 19:54, Dan Carpenter wrote:
> of_iomap() doesn't return error pointers, it returns NULL on error.

Applied.

Thanks,
Inki Dae

> 
> Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
> 
> diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> index 63f02e2..9700461 100644
> --- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> +++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c
> @@ -888,8 +888,8 @@ static int decon_probe(struct platform_device *pdev)
>  	of_node_put(i80_if_timings);
>  
>  	ctx->regs = of_iomap(dev->of_node, 0);
> -	if (IS_ERR(ctx->regs)) {
> -		ret = PTR_ERR(ctx->regs);
> +	if (!ctx->regs) {
> +		ret = -ENOMEM;
>  		goto err_del_component;
>  	}
>  
> 



More information about the dri-devel mailing list