* [PATCH] media: vcodec: fix ptr_ret.cocci warnings
[not found] <201804120528.xhFwZKle%fengguang.wu@intel.com>
@ 2018-04-11 21:14 ` kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2018-04-11 21:14 UTC (permalink / raw)
To: linux-arm-kernel
From: Fengguang Wu <fengguang.wu@intel.com>
drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:1087: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
Fixes: 648a9576932a ("media: vcodec: fix error return value from mtk_jpeg_clk_init()")
CC: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
mtk_jpeg_core.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
+++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
@@ -1084,10 +1084,7 @@ static int mtk_jpeg_clk_init(struct mtk_
return PTR_ERR(jpeg->clk_jdec);
jpeg->clk_jdec_smi = devm_clk_get(jpeg->dev, "jpgdec-smi");
- if (IS_ERR(jpeg->clk_jdec_smi))
- return PTR_ERR(jpeg->clk_jdec_smi);
-
- return 0;
+ return PTR_ERR_OR_ZERO(jpeg->clk_jdec_smi);
}
static int mtk_jpeg_probe(struct platform_device *pdev)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-04-11 21:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <201804120528.xhFwZKle%fengguang.wu@intel.com>
2018-04-11 21:14 ` [PATCH] media: vcodec: fix ptr_ret.cocci warnings kbuild test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox