summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFengguang Wu <fengguang.wu@intel.com>2018-04-11 23:14:39 +0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-05-09 21:58:30 +0200
commitfb21cf4eecbd448dd6d9b91274589562467a1b41 (patch)
treec1adbabc5ca8a49faffb8cae370ba2193ceda7d1
parentmedia: v4l2-core: Rename array 'video_driver' to 'video_drivers' (diff)
downloadlinux-fb21cf4eecbd448dd6d9b91274589562467a1b41.tar.xz
linux-fb21cf4eecbd448dd6d9b91274589562467a1b41.zip
media: vcodec: fix ptr_ret.cocci warnings
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> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r--drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
index af17aaa21f58..328e8f650d9b 100644
--- 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_jpeg_dev *jpeg)
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)