diff options
author | Vasyl Gomonovych <gomonovych@gmail.com> | 2017-11-29 11:20:16 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-12-08 11:29:04 -0500 |
commit | 248cb158bc1a262ff3101b9e5439ff3850b2cfd5 (patch) | |
tree | 6d751799d1c7a41242c595efeef7a48eca91b171 /drivers/media/platform/exynos4-is | |
parent | f3105f0ae4d9fda5b3922319dfe248cdb504c2a8 (diff) | |
download | linux-248cb158bc1a262ff3101b9e5439ff3850b2cfd5.tar.gz linux-248cb158bc1a262ff3101b9e5439ff3850b2cfd5.tar.bz2 linux-248cb158bc1a262ff3101b9e5439ff3850b2cfd5.zip |
media: exynos4-is: Use PTR_ERR_OR_ZERO()
Fix ptr_ret.cocci warnings:
drivers/media/platform/exynos4-is/fimc-lite.c:1465:1-3: WARNING: PTR_ERR_OR_ZERO can be used
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: scripts/coccinelle/api/ptr_ret.cocci
Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/exynos4-is')
-rw-r--r-- | drivers/media/platform/exynos4-is/fimc-lite.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c index 4a3c9948ca54..5db572aa8899 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite.c +++ b/drivers/media/platform/exynos4-is/fimc-lite.c @@ -1462,10 +1462,7 @@ static void fimc_lite_clk_put(struct fimc_lite *fimc) static int fimc_lite_clk_get(struct fimc_lite *fimc) { fimc->clock = clk_get(&fimc->pdev->dev, FLITE_CLK_NAME); - if (IS_ERR(fimc->clock)) - return PTR_ERR(fimc->clock); - - return 0; + return PTR_ERR_OR_ZERO(fimc->clock); } static const struct of_device_id flite_of_match[]; |