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: <20190830114319.2iql3iglqswv3pge@48261080c7f1>
Date:   Fri, 30 Aug 2019 19:43:19 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Thomas Bogendoerfer <tbogendoerfer@...e.de>
Cc:     kbuild-all@...org, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Evgeniy Polyakov <zbr@...emap.net>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] w1: fix ptr_ret.cocci warnings

From: kbuild test robot <lkp@...el.com>

drivers/w1/slaves/w1_ds250x.c:215: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: d835b3166dd6 ("w1: add DS2501, DS2502, DS2505 EPROM device driver")
CC: Thomas Bogendoerfer <tbogendoerfer@...e.de>
Signed-off-by: kbuild test robot <lkp@...el.com>
---

url:    https://github.com/0day-ci/linux/commits/Thomas-Bogendoerfer/w1-add-1-wire-master-driver-for-IP-block-found-in-SGI-ASICs/20190830-122322

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

--- a/drivers/w1/slaves/w1_ds250x.c
+++ b/drivers/w1/slaves/w1_ds250x.c
@@ -212,10 +212,7 @@ static int w1_eprom_add_slave(struct w1_
 	nvmem_cfg.size = data->size;
 
 	nvmem = devm_nvmem_register(&sl->dev, &nvmem_cfg);
-	if (IS_ERR(nvmem))
-		return PTR_ERR(nvmem);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(nvmem);
 }
 
 static struct w1_family_ops w1_eprom_fops = {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ