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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180304130428.GA11571@lkp-hsx02>
Date:   Sun, 4 Mar 2018 21:04:28 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Andrey Smirnov <andrew.smirnov@...il.com>
Cc:     kbuild-all@...org,
        Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Andrey Smirnov <andrew.smirnov@...il.com>,
        Heiko Stuebner <heiko@...ech.de>,
        Masahiro Yamada <yamada.masahiro@...ionext.com>,
        Carlo Caione <carlo@...one.org>,
        Kevin Hilman <khilman@...libre.com>,
        Matthias Brugger <matthias.bgg@...il.com>, cphealy@...il.com,
        linux-kernel@...r.kernel.org, linux-mediatek@...ts.infradead.org,
        linux-rockchip@...ts.infradead.org,
        linux-amlogic@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org
Subject: [PATCH] nvmem: lpc18xx_otp: fix ptr_ret.cocci warnings

From: Fengguang Wu <fengguang.wu@...el.com>

drivers/nvmem/lpc18xx_otp.c:90: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: e738282235ec ("nvmem: lpc18xx_otp: Convert to use devm_nvmem_register()")
CC: Andrey Smirnov <andrew.smirnov@...il.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---

 lpc18xx_otp.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/nvmem/lpc18xx_otp.c
+++ b/drivers/nvmem/lpc18xx_otp.c
@@ -87,10 +87,7 @@ static int lpc18xx_otp_probe(struct plat
 	lpc18xx_otp_nvmem_config.priv = otp;
 
 	nvmem = devm_nvmem_register(&pdev->dev, &lpc18xx_otp_nvmem_config);
-	if (IS_ERR(nvmem))
-		return PTR_ERR(nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(nvmem);
 }
 
 static const struct of_device_id lpc18xx_otp_dt_ids[] = {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ