diff options
author | Fengguang Wu <fengguang.wu@intel.com> | 2018-04-12 00:14:39 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-05-09 22:58:30 +0300 |
commit | fb21cf4eecbd448dd6d9b91274589562467a1b41 (patch) | |
tree | c1adbabc5ca8a49faffb8cae370ba2193ceda7d1 /drivers/media/platform/mtk-jpeg | |
parent | ee7582431f49b6fbdd6f9307cf20ddddf42ceeaa (diff) | |
download | linux-fb21cf4eecbd448dd6d9b91274589562467a1b41.tar.xz |
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>
Diffstat (limited to 'drivers/media/platform/mtk-jpeg')
-rw-r--r-- | drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 5 |
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) |