diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-20 11:36:52 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-20 11:36:52 -0700 |
commit | 622f223488517f2b0a5a5e518b2a6c950cf0a2ee (patch) | |
tree | 6ee3fcb99e88c3fc8163561444a888ef842b1da9 /drivers/hwmon/abituguru.c | |
parent | 5e427ec2d066b48a5c27b3a5a3315f7e4e729077 (diff) | |
parent | 917cc4e6b25c655264e8ea903eb77db25994ac24 (diff) |
Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon fixes from Guenter Roeck:
- Error path fixes for abituguru and iio_hwmon drivers.
- Drop erroneously created attributes from nct6775 driver.
- Drop redundant safety on cache lifetime for tmp401 driver.
- Add explicit maintainer for LM95234 and TMP401 drivers.
* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
MAINTAINERS: Add myself as maintainer for LM95234 and TMP401 drivers
hwmon: (tmp401) Drop redundant safety on cache lifetime
hwmon: fix error return code in abituguru_probe()
hwmon: (iio_hwmon) Fix null pointer dereference
hwmon: (nct6775) Do not create non-existing attributes
hwmon: (iio_hwmon) Fix missing iio_channel_release_all call if devm_kzalloc fail
Diffstat (limited to 'drivers/hwmon/abituguru.c')
-rw-r--r-- | drivers/hwmon/abituguru.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/hwmon/abituguru.c b/drivers/hwmon/abituguru.c index df0b6998791..2ebd6ce4610 100644 --- a/drivers/hwmon/abituguru.c +++ b/drivers/hwmon/abituguru.c @@ -1414,14 +1414,18 @@ static int abituguru_probe(struct platform_device *pdev) pr_info("found Abit uGuru\n"); /* Register sysfs hooks */ - for (i = 0; i < sysfs_attr_i; i++) - if (device_create_file(&pdev->dev, - &data->sysfs_attr[i].dev_attr)) + for (i = 0; i < sysfs_attr_i; i++) { + res = device_create_file(&pdev->dev, + &data->sysfs_attr[i].dev_attr); + if (res) goto abituguru_probe_error; - for (i = 0; i < ARRAY_SIZE(abituguru_sysfs_attr); i++) - if (device_create_file(&pdev->dev, - &abituguru_sysfs_attr[i].dev_attr)) + } + for (i = 0; i < ARRAY_SIZE(abituguru_sysfs_attr); i++) { + res = device_create_file(&pdev->dev, + &abituguru_sysfs_attr[i].dev_attr); + if (res) goto abituguru_probe_error; + } data->hwmon_dev = hwmon_device_register(&pdev->dev); if (!IS_ERR(data->hwmon_dev)) |