]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
fbdev: exynos: fix IS_ERR_VALUE usage
authorAndrzej Hajda <a.hajda@samsung.com>
Mon, 15 Feb 2016 14:35:24 +0000 (15:35 +0100)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 16 Feb 2016 13:35:12 +0000 (15:35 +0200)
IS_ERR_VALUE macro should be used only with unsigned long type.
For signed types comparison 'ret < 0' should be used.

The patch follows conclusion from discussion on LKML [1][2].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2120927
[2]: http://permalink.gmane.org/gmane.linux.kernel/2150581

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/fbdev/exynos/exynos_mipi_dsi.c

index b527fe464628578b65f6effa91c5998a16311cb0..951b592794e34c7b69842dad44418a097a2d151d 100644 (file)
@@ -402,12 +402,12 @@ static int exynos_mipi_dsi_probe(struct platform_device *pdev)
                goto error;
        }
 
-       dsim->irq = platform_get_irq(pdev, 0);
-       if (IS_ERR_VALUE(dsim->irq)) {
+       ret = platform_get_irq(pdev, 0);
+       if (ret < 0) {
                dev_err(&pdev->dev, "failed to request dsim irq resource\n");
-               ret = -EINVAL;
                goto error;
        }
+       dsim->irq = ret;
 
        init_completion(&dsim_wr_comp);
        init_completion(&dsim_rd_comp);