hwmon: twl4030-madc-hwmon: Return proper error if hwmon_device_register fails
PATCH 1/1 hwmon: twl4030-madc-hwmon: Return proper error if hwmon_device_register fails
Signed-off-by Axel Lin <[email protected]>
--- drivers/hwmon/twl4030-madc-hwmon.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/hwmon/twl4030-madc-hwmon.c +1 -2
@@ -98,7 +98,6 @@ static const struct attribute_group twl4030_madc_group = {static int __devinit twl4030_madc_hwmon_probe (struct platform_device *pdev) {int ret; -int status;struct device *hwmon; ret =sysfs_create_group (&pdev->dev.kobj, &twl4030_madc_group);
@@ -107,7 +106,7 @@ static int __devinit twl4030_madc_hwmon_probe(struct platform_device *pdev) hwmon =hwmon_device_register (&pdev->dev);if (IS_ERR (hwmon)) {dev_err (&pdev->dev,"hwmon_device_register failed.\n" ); - status =PTR_ERR (hwmon); + ret =PTR_ERR (hwmon); goto err_reg; }
Signature · 9 lines
1.7.1 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 1 line · Axel Lin
Signed-off-by Axel Lin <[email protected]>
Good catch. Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors