summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2013-09-11 13:32:18 -0400
committerGuenter Roeck <linux@roeck-us.net>2013-10-13 19:16:25 -0400
commite8ab508c27be9868411b6578507e93e02bdb8cdb (patch)
tree41760abf18d0d41759dc077e5ed7bbb7862cab95
parenta0393713530c49697e49ce0456c039228ab7facb (diff)
hwmon: (nct6775) Use return value from find_temp_source
smatch complains that we don't use the return value from find_temp_source(). Valid point, only find_temp_source() doesn't return a valid error code. Have it return a valid error code and use it. Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--drivers/hwmon/nct6775.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c
index 6eb03ce2cff4..de57e0d60d23 100644
--- a/drivers/hwmon/nct6775.c
+++ b/drivers/hwmon/nct6775.c
@@ -1545,7 +1545,7 @@ static int find_temp_source(struct nct6775_data *data, int index, int count)
1545 if (src == source) 1545 if (src == source)
1546 return nr; 1546 return nr;
1547 } 1547 }
1548 return -1; 1548 return -ENODEV;
1549} 1549}
1550 1550
1551static ssize_t 1551static ssize_t
@@ -1644,7 +1644,7 @@ store_temp_beep(struct device *dev, struct device_attribute *attr,
1644 1644
1645 nr = find_temp_source(data, sattr->index, data->num_temp_beeps); 1645 nr = find_temp_source(data, sattr->index, data->num_temp_beeps);
1646 if (nr < 0) 1646 if (nr < 0)
1647 return -ENODEV; 1647 return nr;
1648 1648
1649 bit = data->BEEP_BITS[nr + TEMP_ALARM_BASE]; 1649 bit = data->BEEP_BITS[nr + TEMP_ALARM_BASE];
1650 regindex = bit >> 3; 1650 regindex = bit >> 3;