forked from Minki/linux
Some more low risk cleanup patches:
Remove unnecessary pci_set_drvdata in k10temp driver from Jingoo Han Fix return values in several drivers from Sachin Kamat Remove redundant break in amc6821 driver from Sachin Kamat -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAABAgAGBQJSMeiEAAoJEMsfJm/On5mBi78P/jBVis7/4KDVFV1KAy1NhzAD EzxRN7X2sM3Iihj1wjMflcW6k9JSzIbC/Q82ouvVNzlgOZu85yoi926p0PIH7A/g E/X4hlictBzTsc9SjTGio9E6f59wFroBSDnquEo6JRCgdX9DqeaGzh8W/0PR5wSh SkZgXGoXxAK1fH26UZ1sXf2k4y4d6xNGVAv/HIb3jHu1EhDTb0cHzg+5m+qvdSuD 5RBfVJMEiJITCHAhP9IdiWP6k8iePLnaBaR77J6vAxWrSBD6a3D4loDkd/FguqGJ svkyldm5CB0bhHCMEP6IwGNeyr1W/D2OcueYmMDc99HIY+zAOjhAnge1skBIr6A/ hmNf7UT3xH0AQMp4I1ALgdu1Ie95lq3COGXwKy1ir/BVCYAeWC1MWb7qtmRcxqyt pwc9DHaplIRLoKM+CJEwV6o+gaP9L6+BiBn15g5Rv0RA7vvpl0d/Yrjx4ChWL06K paQcxvML/WUjq5uBIFzJmpfXhsUYcMC+YlPRwYhmEql0nTAFWnLejQrIMeSiH0VW ADWlN6DFJz75B7HnVnP9jk4H0ljMS9FJBhC2IkH1pDBrtLZs8ChCGXc4md0LwT7T 1yB2AQGUhb/izDXlw/0I7Q7mJYgYfggaXg1LkRWrV9zjetvzwnArMQ/K4AOiV6yo Kxx5tUAkMaFzobqowgvQ =Lcfb -----END PGP SIGNATURE----- Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: "Some more low risk cleanup patches: - Remove unnecessary pci_set_drvdata in k10temp driver from Jingoo Han - Fix return values in several drivers from Sachin Kamat - Remove redundant break in amc6821 driver from Sachin Kamat" * tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (k10temp) remove unnecessary pci_set_drvdata() hwmon: (tmp421) Fix return value hwmon: (amc6821) Remove redundant break hwmon: (amc6821) Fix return value hwmon: (ibmaem) Fix return value hwmon: (emc2103) Fix return value
This commit is contained in:
commit
bdbdfdef57
@ -364,7 +364,7 @@ static ssize_t set_pwm1_enable(
|
||||
if (config < 0) {
|
||||
dev_err(&client->dev,
|
||||
"Error reading configuration register, aborting.\n");
|
||||
return -EIO;
|
||||
return config;
|
||||
}
|
||||
|
||||
switch (val) {
|
||||
@ -416,11 +416,9 @@ static ssize_t get_temp_auto_point_temp(
|
||||
case 1:
|
||||
return sprintf(buf, "%d\n",
|
||||
data->temp1_auto_point_temp[ix] * 1000);
|
||||
break;
|
||||
case 2:
|
||||
return sprintf(buf, "%d\n",
|
||||
data->temp2_auto_point_temp[ix] * 1000);
|
||||
break;
|
||||
default:
|
||||
dev_dbg(dev, "Unknown attr->nr (%d).\n", nr);
|
||||
return -EINVAL;
|
||||
@ -513,7 +511,6 @@ static ssize_t set_temp_auto_point_temp(
|
||||
count = -EIO;
|
||||
}
|
||||
goto EXIT;
|
||||
break;
|
||||
case 1:
|
||||
ptemp[1] = clamp_val(val / 1000, (ptemp[0] & 0x7C) + 4, 124);
|
||||
ptemp[1] &= 0x7C;
|
||||
@ -665,7 +662,7 @@ static ssize_t set_fan1_div(
|
||||
if (config < 0) {
|
||||
dev_err(&client->dev,
|
||||
"Error reading configuration register, aborting.\n");
|
||||
return -EIO;
|
||||
return config;
|
||||
}
|
||||
mutex_lock(&data->update_lock);
|
||||
switch (val) {
|
||||
|
@ -248,7 +248,7 @@ static ssize_t set_temp_min(struct device *dev, struct device_attribute *da,
|
||||
|
||||
int result = kstrtol(buf, 10, &val);
|
||||
if (result < 0)
|
||||
return -EINVAL;
|
||||
return result;
|
||||
|
||||
val = DIV_ROUND_CLOSEST(val, 1000);
|
||||
if ((val < -63) || (val > 127))
|
||||
@ -272,7 +272,7 @@ static ssize_t set_temp_max(struct device *dev, struct device_attribute *da,
|
||||
|
||||
int result = kstrtol(buf, 10, &val);
|
||||
if (result < 0)
|
||||
return -EINVAL;
|
||||
return result;
|
||||
|
||||
val = DIV_ROUND_CLOSEST(val, 1000);
|
||||
if ((val < -63) || (val > 127))
|
||||
@ -320,7 +320,7 @@ static ssize_t set_fan_div(struct device *dev, struct device_attribute *da,
|
||||
|
||||
int status = kstrtol(buf, 10, &new_div);
|
||||
if (status < 0)
|
||||
return -EINVAL;
|
||||
return status;
|
||||
|
||||
if (new_div == old_div) /* No change */
|
||||
return count;
|
||||
@ -394,7 +394,7 @@ static ssize_t set_fan_target(struct device *dev, struct device_attribute *da,
|
||||
|
||||
int result = kstrtol(buf, 10, &rpm_target);
|
||||
if (result < 0)
|
||||
return -EINVAL;
|
||||
return result;
|
||||
|
||||
/* Datasheet states 16384 as maximum RPM target (table 3.2) */
|
||||
if ((rpm_target < 0) || (rpm_target > 16384))
|
||||
@ -440,7 +440,7 @@ static ssize_t set_pwm_enable(struct device *dev, struct device_attribute *da,
|
||||
|
||||
int result = kstrtol(buf, 10, &new_value);
|
||||
if (result < 0)
|
||||
return -EINVAL;
|
||||
return result;
|
||||
|
||||
mutex_lock(&data->update_lock);
|
||||
switch (new_value) {
|
||||
|
@ -292,7 +292,7 @@ static int aem_init_ipmi_data(struct aem_ipmi_data *data, int iface,
|
||||
dev_err(bmc,
|
||||
"Unable to register user with IPMI interface %d\n",
|
||||
data->interface);
|
||||
return -EACCES;
|
||||
return err;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -202,7 +202,6 @@ static void k10temp_remove(struct pci_dev *pdev)
|
||||
&sensor_dev_attr_temp1_crit.dev_attr);
|
||||
device_remove_file(&pdev->dev,
|
||||
&sensor_dev_attr_temp1_crit_hyst.dev_attr);
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
}
|
||||
|
||||
static DEFINE_PCI_DEVICE_TABLE(k10temp_id_table) = {
|
||||
|
@ -210,7 +210,7 @@ static int tmp421_init_client(struct i2c_client *client)
|
||||
if (config < 0) {
|
||||
dev_err(&client->dev,
|
||||
"Could not read configuration register (%d)\n", config);
|
||||
return -ENODEV;
|
||||
return config;
|
||||
}
|
||||
|
||||
config_orig = config;
|
||||
|
Loading…
Reference in New Issue
Block a user