aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/amc6821.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/amc6821.c')
-rw-r--r--drivers/hwmon/amc6821.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/hwmon/amc6821.c b/drivers/hwmon/amc6821.c
index 4fe49d2bfe1d..eea817296513 100644
--- a/drivers/hwmon/amc6821.c
+++ b/drivers/hwmon/amc6821.c
@@ -364,7 +364,7 @@ static ssize_t set_pwm1_enable(
364 if (config < 0) { 364 if (config < 0) {
365 dev_err(&client->dev, 365 dev_err(&client->dev,
366 "Error reading configuration register, aborting.\n"); 366 "Error reading configuration register, aborting.\n");
367 return -EIO; 367 return config;
368 } 368 }
369 369
370 switch (val) { 370 switch (val) {
@@ -416,11 +416,9 @@ static ssize_t get_temp_auto_point_temp(
416 case 1: 416 case 1:
417 return sprintf(buf, "%d\n", 417 return sprintf(buf, "%d\n",
418 data->temp1_auto_point_temp[ix] * 1000); 418 data->temp1_auto_point_temp[ix] * 1000);
419 break;
420 case 2: 419 case 2:
421 return sprintf(buf, "%d\n", 420 return sprintf(buf, "%d\n",
422 data->temp2_auto_point_temp[ix] * 1000); 421 data->temp2_auto_point_temp[ix] * 1000);
423 break;
424 default: 422 default:
425 dev_dbg(dev, "Unknown attr->nr (%d).\n", nr); 423 dev_dbg(dev, "Unknown attr->nr (%d).\n", nr);
426 return -EINVAL; 424 return -EINVAL;
@@ -513,7 +511,6 @@ static ssize_t set_temp_auto_point_temp(
513 count = -EIO; 511 count = -EIO;
514 } 512 }
515 goto EXIT; 513 goto EXIT;
516 break;
517 case 1: 514 case 1:
518 ptemp[1] = clamp_val(val / 1000, (ptemp[0] & 0x7C) + 4, 124); 515 ptemp[1] = clamp_val(val / 1000, (ptemp[0] & 0x7C) + 4, 124);
519 ptemp[1] &= 0x7C; 516 ptemp[1] &= 0x7C;
@@ -665,7 +662,7 @@ static ssize_t set_fan1_div(
665 if (config < 0) { 662 if (config < 0) {
666 dev_err(&client->dev, 663 dev_err(&client->dev,
667 "Error reading configuration register, aborting.\n"); 664 "Error reading configuration register, aborting.\n");
668 return -EIO; 665 return config;
669 } 666 }
670 mutex_lock(&data->update_lock); 667 mutex_lock(&data->update_lock);
671 switch (val) { 668 switch (val) {