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: <20190420043016.GA4464@lkp-kbuild13>
Date:   Sat, 20 Apr 2019 12:30:16 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Nick Crews <ncrews@...omium.org>
Cc:     kbuild-all@...org, bleung@...omium.org, sre@...nel.org,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        dlaurie@...omium.org, lamzin@...gle.com, bartfab@...gle.com,
        derat@...gle.com, dtor@...gle.com, sjg@...omium.org,
        jchwong@...omium.org, Nick Crews <ncrews@...omium.org>
Subject: [PATCH] power_supply: platform/chrome: wilco_ec: fix ptr_ret.cocci
 warnings

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

drivers/power/supply/wilco-charger.c:173: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: 2600e89ec94e ("power_supply: platform/chrome: wilco_ec: Add charging config driver")
CC: Nick Crews <ncrews@...omium.org>
Signed-off-by: kbuild test robot <lkp@...el.com>
---

url:    https://github.com/0day-ci/linux/commits/Nick-Crews/power_supply-platform-chrome-wilco_ec-Add-charging-config-driver/20190420-041913

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

--- a/drivers/power/supply/wilco-charger.c
+++ b/drivers/power/supply/wilco-charger.c
@@ -170,10 +170,7 @@ static int wilco_charge_probe(struct pla
 
 	psy_cfg.drv_data = ec;
 	psy = devm_power_supply_register(&pdev->dev, &wilco_ps_desc, &psy_cfg);
-	if (IS_ERR(psy))
-		return PTR_ERR(psy);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(psy);
 }
 
 static struct platform_driver wilco_charge_driver = {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ