From: Dan Carpenter Date: Fri, 20 Feb 2015 10:54:43 +0000 (+0300) Subject: drm/exynos: IS_ERR() vs NULL bug X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aed45ab4b07472920ed22ad43b8ffa123c590d57;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/exynos: IS_ERR() vs NULL bug of_iomap() doesn't return error pointers, it returns NULL on error. Signed-off-by: Dan Carpenter Reviewed-by: Gustavo Padovan Signed-off-by: Inki Dae --- diff --git a/drivers/gpu/drm/exynos/exynos7_drm_decon.c b/drivers/gpu/drm/exynos/exynos7_drm_decon.c index 63f02e2380ae..970046199608 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; }