* [PATCH] media: exynos4-is: Use PTR_ERR_OR_ZERO()
@ 2017-11-29 16:20 Vasyl Gomonovych
0 siblings, 0 replies; only message in thread
From: Vasyl Gomonovych @ 2017-11-29 16:20 UTC (permalink / raw)
To: linux-samsung-soc, linux-arm-kernel, linux-media
Cc: Vasyl Gomonovych, Kyungmin Park, Sylwester Nawrocki,
Mauro Carvalho Chehab, Kukjin Kim, Krzysztof Kozlowski,
linux-kernel
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>
---
drivers/media/platform/exynos4-is/fimc-lite.c | 5 +----
1 file changed, 1 insertion(+), 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[];
--
1.9.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-11-29 16:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-29 16:20 [PATCH] media: exynos4-is: Use PTR_ERR_OR_ZERO() Vasyl Gomonovych
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).