]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm: sti: tvout: fix return value check in sti_tvout_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 26 Aug 2014 10:17:36 +0000 (12:17 +0200)
committerBenjamin Gaignard <benjamin.gaignard@linaro.org>
Tue, 26 Aug 2014 12:16:32 +0000 (14:16 +0200)
In case of error, the function devm_ioremap_nocache() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
drivers/gpu/drm/sti/sti_tvout.c

index b69e26fee76e0736af3062053e25b41cd47979f9..9ad2d44d496f73e6728a8acdb6e8093026993164 100644 (file)
@@ -591,8 +591,8 @@ static int sti_tvout_probe(struct platform_device *pdev)
                return -ENOMEM;
        }
        tvout->regs = devm_ioremap_nocache(dev, res->start, resource_size(res));
-       if (IS_ERR(tvout->regs))
-               return PTR_ERR(tvout->regs);
+       if (!tvout->regs)
+               return -ENOMEM;
 
        /* get reset resources */
        tvout->reset = devm_reset_control_get(dev, "tvout");