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>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1701100648130.2185@hadrien>
Date:   Tue, 10 Jan 2017 06:49:08 +0100 (CET)
From:   Julia Lawall <julia.lawall@...6.fr>
To:     Jaghathiswari Rankappagounder Natarajan <jaghu@...gle.com>
cc:     openbmc@...ts.ozlabs.org, joel@....id.au, jdelvare@...e.com,
        linux@...ck-us.net, linux-hwmon@...r.kernel.org,
        linux-kernel@...r.kernel.org, corbet@....net,
        linux-doc@...r.kernel.org, robh+dt@...nel.org,
        mark.rutland@....com, devicetree@...r.kernel.org, kbuild-all@...org
Subject: [PATCH] drivers: hwmon: fix ptr_ret.cocci warnings

Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Generated by: scripts/coccinelle/api/ptr_ret.cocci

CC: Jaghathiswari Rankappagounder Natarajan <jaghu@...gle.com>
Signed-off-by: Julia Lawall <julia.lawall@...6.fr>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---

 aspeed-pwm-tacho.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

--- a/drivers/hwmon/aspeed-pwm-tacho.c
+++ b/drivers/hwmon/aspeed-pwm-tacho.c
@@ -855,10 +855,7 @@ static int aspeed_pwm_tacho_probe(struct
 	hwmon = devm_hwmon_device_register_with_groups(&pdev->dev,
 						       "aspeed_pwm_tacho",
 						       priv, priv->groups);
-	if (IS_ERR(hwmon))
-		return PTR_ERR(hwmon);
-
-	return 0;
+	return PTR_ERR_OR_ZERO(hwmon);
 }

 static const struct of_device_id of_pwm_tacho_match_table[] = {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ