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: <20170112073956.GA29782@lkp-ib03.lkp.intel.com>
Date:   Thu, 12 Jan 2017 15:39:56 +0800
From:   kbuild test robot <lkp@...el.com>
To:     eajames.ibm@...il.com
Cc:     kbuild-all@...org, linux@...ck-us.net, devicetree@...r.kernel.org,
        jdelvare@...e.com, corbet@....net, linux-doc@...r.kernel.org,
        linux-hwmon@...r.kernel.org, linux-i2c@...r.kernel.org,
        linux-kernel@...r.kernel.org, mark.rutland@....com,
        robh+dt@...nel.org, wsa@...-dreams.de, andrew@...id.au,
        joel@....id.au, benh@...nel.crashing.org,
        "Edward A. James" <eajames@...ibm.com>
Subject: [PATCH] hwmon: occ: fix err_cast.cocci warnings

drivers/hwmon/occ/occ_sysfs.c:265:9-16: WARNING: ERR_CAST can be used with hwmon -> dev


 Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))

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

CC: Edward A. James <eajames@...ibm.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---

 occ_sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/hwmon/occ/occ_sysfs.c
+++ b/drivers/hwmon/occ/occ_sysfs.c
@@ -262,7 +262,7 @@ struct occ_sysfs *occ_sysfs_start(struct
 	if (IS_ERR(hwmon->dev)) {
 		dev_err(dev, "cannot register hwmon device %s: %ld\n",
 			hwmon->hwmon_name, PTR_ERR(hwmon->dev));
-		return ERR_PTR(PTR_ERR(hwmon->dev));
+		return ERR_CAST(hwmon->dev);
 	}
 
 	return hwmon;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ