diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2019-02-11 09:17:23 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-02-11 09:17:23 +0100 |
commit | e65372124cd749ebbe4ac2abe5a511d7d1ac68db (patch) | |
tree | 1f9fd7cec6ffba19c76fff1e82c562fa1adae5da /drivers/hwmon/lm80.c | |
parent | a3240f09307ac978270d423b542f229e2ccc07b8 (diff) | |
parent | d13937116f1e82bf508a6325111b322c30c85eb9 (diff) |
Merge tag 'v5.0-rc6' into devel
Linux 5.0-rc6
Diffstat (limited to 'drivers/hwmon/lm80.c')
-rw-r--r-- | drivers/hwmon/lm80.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/hwmon/lm80.c b/drivers/hwmon/lm80.c index 0e30fa00204c..f9b8e3e23a8e 100644 --- a/drivers/hwmon/lm80.c +++ b/drivers/hwmon/lm80.c @@ -393,8 +393,10 @@ static ssize_t set_fan_div(struct device *dev, struct device_attribute *attr, } rv = lm80_read_value(client, LM80_REG_FANDIV); - if (rv < 0) + if (rv < 0) { + mutex_unlock(&data->update_lock); return rv; + } reg = (rv & ~(3 << (2 * (nr + 1)))) | (data->fan_div[nr] << (2 * (nr + 1))); lm80_write_value(client, LM80_REG_FANDIV, reg); |