]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/video/exynos/exynos_mipi_dsi.c: fix an error check condition
authorSachin Kamat <sachin.kamat@linaro.org>
Wed, 20 Feb 2013 02:13:41 +0000 (13:13 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:08 +0000 (16:52 +1100)
Checking an unsigned variable for negative value returns false.  Hence use
the macro to fix it.

Fixes the following smatch warning:
drivers/video/exynos/exynos_mipi_dsi.c:417 exynos_mipi_dsi_probe() warn:
unsigned 'dsim->irq' is never less than zero.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Donghwa Lee <dh09.lee@samsung.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/video/exynos/exynos_mipi_dsi.c

index 4a17cdccef3466f616178688436b39a856ded206..f623dfcca9275d5575ef34d7b4e2a288a45fdfcb 100644 (file)
@@ -414,7 +414,7 @@ static int exynos_mipi_dsi_probe(struct platform_device *pdev)
        }
 
        dsim->irq = platform_get_irq(pdev, 0);
-       if (dsim->irq < 0) {
+       if (IS_ERR_VALUE(dsim->irq)) {
                dev_err(&pdev->dev, "failed to request dsim irq resource\n");
                ret = -EINVAL;
                goto err_platform_get_irq;