Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+34 -12
+14
MAINTAINERS
··· 4976 4976 F: Documentation/hwmon/lm90 4977 4977 F: drivers/hwmon/lm90.c 4978 4978 4979 + LM95234 HARDWARE MONITOR DRIVER 4980 + M: Guenter Roeck <linux@roeck-us.net> 4981 + L: lm-sensors@lm-sensors.org 4982 + S: Maintained 4983 + F: Documentation/hwmon/lm95234 4984 + F: drivers/hwmon/lm95234.c 4985 + 4979 4986 LME2510 MEDIA DRIVER 4980 4987 M: Malcolm Priestley <tvboxspy@gmail.com> 4981 4988 L: linux-media@vger.kernel.org ··· 8188 8181 F: drivers/mmc/host/sh_mobile_sdhi.c 8189 8182 F: include/linux/mmc/tmio.h 8190 8183 F: include/linux/mmc/sh_mobile_sdhi.h 8184 + 8185 + TMP401 HARDWARE MONITOR DRIVER 8186 + M: Guenter Roeck <linux@roeck-us.net> 8187 + L: lm-sensors@lm-sensors.org 8188 + S: Maintained 8189 + F: Documentation/hwmon/tmp401 8190 + F: drivers/hwmon/tmp401.c 8191 8191 8192 8192 TMPFS (SHMEM FILESYSTEM) 8193 8193 M: Hugh Dickins <hughd@google.com>
+10 -6
drivers/hwmon/abituguru.c
··· 1414 1414 pr_info("found Abit uGuru\n"); 1415 1415 1416 1416 /* Register sysfs hooks */ 1417 - for (i = 0; i < sysfs_attr_i; i++) 1418 - if (device_create_file(&pdev->dev, 1419 - &data->sysfs_attr[i].dev_attr)) 1417 + for (i = 0; i < sysfs_attr_i; i++) { 1418 + res = device_create_file(&pdev->dev, 1419 + &data->sysfs_attr[i].dev_attr); 1420 + if (res) 1420 1421 goto abituguru_probe_error; 1421 - for (i = 0; i < ARRAY_SIZE(abituguru_sysfs_attr); i++) 1422 - if (device_create_file(&pdev->dev, 1423 - &abituguru_sysfs_attr[i].dev_attr)) 1422 + } 1423 + for (i = 0; i < ARRAY_SIZE(abituguru_sysfs_attr); i++) { 1424 + res = device_create_file(&pdev->dev, 1425 + &abituguru_sysfs_attr[i].dev_attr); 1426 + if (res) 1424 1427 goto abituguru_probe_error; 1428 + } 1425 1429 1426 1430 data->hwmon_dev = hwmon_device_register(&pdev->dev); 1427 1431 if (!IS_ERR(data->hwmon_dev))
+5 -3
drivers/hwmon/iio_hwmon.c
··· 84 84 return PTR_ERR(channels); 85 85 86 86 st = devm_kzalloc(dev, sizeof(*st), GFP_KERNEL); 87 - if (st == NULL) 88 - return -ENOMEM; 87 + if (st == NULL) { 88 + ret = -ENOMEM; 89 + goto error_release_channels; 90 + } 89 91 90 92 st->channels = channels; 91 93 ··· 161 159 error_remove_group: 162 160 sysfs_remove_group(&dev->kobj, &st->attr_group); 163 161 error_release_channels: 164 - iio_channel_release_all(st->channels); 162 + iio_channel_release_all(channels); 165 163 return ret; 166 164 } 167 165
+4 -2
drivers/hwmon/nct6775.c
··· 3705 3705 data->have_temp |= 1 << i; 3706 3706 data->have_temp_fixed |= 1 << i; 3707 3707 data->reg_temp[0][i] = reg_temp_alternate[i]; 3708 - data->reg_temp[1][i] = reg_temp_over[i]; 3709 - data->reg_temp[2][i] = reg_temp_hyst[i]; 3708 + if (i < num_reg_temp) { 3709 + data->reg_temp[1][i] = reg_temp_over[i]; 3710 + data->reg_temp[2][i] = reg_temp_hyst[i]; 3711 + } 3710 3712 data->temp_src[i] = i + 1; 3711 3713 continue; 3712 3714 }
+1 -1
drivers/hwmon/tmp401.c
··· 240 240 mutex_lock(&data->update_lock); 241 241 242 242 next_update = data->last_updated + 243 - msecs_to_jiffies(data->update_interval) + 1; 243 + msecs_to_jiffies(data->update_interval); 244 244 if (time_after(jiffies, next_update) || !data->valid) { 245 245 if (data->kind != tmp432) { 246 246 /*