drm/exynos: IS_ERR() vs NULL bug
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 20 Feb 2015 10:54:43 +0000 (13:54 +0300)
committerInki Dae <inki.dae@samsung.com>
Wed, 18 Mar 2015 11:41:18 +0000 (20:41 +0900)
of_iomap() doesn't return error pointers, it returns NULL on error.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos7_drm_decon.c

index 63f02e2380ae1a24746ed87153a1703491f23dff..970046199608484365195ecdd78d27fecc57ed4b 100644 (file)
@@ -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;
        }