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:
"Two minor fixes in emc2103 and applesmc drivers."

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (emc2103) Fix use of an uninitilized variable in error case
hwmon: (applesmc) Limit key length in warning messages

+10 -6
+2 -2
drivers/hwmon/applesmc.c
··· 215 215 int i; 216 216 217 217 if (send_command(cmd) || send_argument(key)) { 218 - pr_warn("%s: read arg fail\n", key); 218 + pr_warn("%.4s: read arg fail\n", key); 219 219 return -EIO; 220 220 } 221 221 ··· 223 223 224 224 for (i = 0; i < len; i++) { 225 225 if (__wait_status(0x05)) { 226 - pr_warn("%s: read data fail\n", key); 226 + pr_warn("%.4s: read data fail\n", key); 227 227 return -EIO; 228 228 } 229 229 buffer[i] = inb(APPLESMC_DATA_PORT);
+8 -4
drivers/hwmon/emc2103.c
··· 451 451 data->fan_rpm_control = true; 452 452 break; 453 453 default: 454 - mutex_unlock(&data->update_lock); 455 - return -EINVAL; 454 + count = -EINVAL; 455 + goto err; 456 456 } 457 457 458 - read_u8_from_i2c(client, REG_FAN_CONF1, &conf_reg); 458 + result = read_u8_from_i2c(client, REG_FAN_CONF1, &conf_reg); 459 + if (result) { 460 + count = result; 461 + goto err; 462 + } 459 463 460 464 if (data->fan_rpm_control) 461 465 conf_reg |= 0x80; ··· 467 463 conf_reg &= ~0x80; 468 464 469 465 i2c_smbus_write_byte_data(client, REG_FAN_CONF1, conf_reg); 470 - 466 + err: 471 467 mutex_unlock(&data->update_lock); 472 468 return count; 473 469 }