lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180411211439.GA16400@lkp-wsm-ep1>
Date:   Thu, 12 Apr 2018 05:14:39 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Ryder Lee <ryder.lee@...iatek.com>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org,
        Mauro Carvalho Chehab <m.chehab@...sung.com>,
        linux-media@...r.kernel.org,
        Matthias Brugger <matthias.bgg@...il.com>,
        Hans Verkuil <hverkuil@...all.nl>,
        Rick Chang <rick.chang@...iatek.com>,
        Bin Liu <bin.liu@...iatek.com>,
        linux-arm-kernel@...ts.infradead.org,
        linux-mediatek@...ts.infradead.org
Subject: [PATCH] media: vcodec: fix ptr_ret.cocci warnings

From: Fengguang Wu <fengguang.wu@...el.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@...iatek.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.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)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ