projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41141e6
)
hwmon: (ntc_thermistor) Return error code from hwmon_device_register
author
Guenter Roeck
<guenter.roeck@ericsson.com>
Mon, 23 Apr 2012 17:41:03 +0000
(10:41 -0700)
committer
Guenter Roeck
<guenter.roeck@ericsson.com>
Mon, 21 May 2012 02:41:49 +0000
(19:41 -0700)
hwmon_device_register() never returns a NULL pointer in case of errors, but
an error value. Use it.
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Reviewed-by: Robert Coulson <robert.coulson@ericsson.com>
drivers/hwmon/ntc_thermistor.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/ntc_thermistor.c
b/drivers/hwmon/ntc_thermistor.c
index
4be7faf
..
b31bf1d
100644
(file)
--- a/
drivers/hwmon/ntc_thermistor.c
+++ b/
drivers/hwmon/ntc_thermistor.c
@@
-382,9
+382,9
@@
static int __devinit ntc_thermistor_probe(struct platform_device *pdev)
}
data->hwmon_dev = hwmon_device_register(data->dev);
- if (IS_ERR
_OR_NULL
(data->hwmon_dev)) {
+ if (IS_ERR(data->hwmon_dev)) {
dev_err(data->dev, "unable to register as hwmon device.\n");
- ret =
-EINVAL
;
+ ret =
PTR_ERR(data->hwmon_dev)
;
goto err_after_sysfs;
}