Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1557150
| From | kbuild test robot <lkp@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] hwmon: occ: fix err_cast.cocci warnings |
| Date | 2017-01-12 08:50 +0100 |
| Message-ID | <sYIiZ-1dR-3@gated-at.bofh.it> (permalink) |
| References | <sYIiZ-1dR-5@gated-at.bofh.it> <sYvF8-1NE-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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@us.ibm.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.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;
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH linux v2 2/6] hwmon: occ: Add sysfs interface eajames.ibm@gmail.com - 2017-01-11 19:20 +0100 [PATCH] hwmon: occ: fix err_cast.cocci warnings kbuild test robot <lkp@intel.com> - 2017-01-12 08:50 +0100 Re: [PATCH linux v2 2/6] hwmon: occ: Add sysfs interface kbuild test robot <lkp@intel.com> - 2017-01-12 08:50 +0100 Re: [PATCH linux v2 2/6] hwmon: occ: Add sysfs interface Guenter Roeck <linux@roeck-us.net> - 2017-01-15 19:20 +0100
csiph-web