hwmon: (lm80) Fix missing unlock on error in set_fan_div()
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 26 Dec 2018 11:28:24 +0000 (11:28 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Feb 2019 08:07:26 +0000 (09:07 +0100)
commit82f39f0219441075bdba1aa3e14b5d4b1fa0b481
treeafc43404351148c9b768ad1c9dab6d22df153972
parent718ccdb3ea31c7e4519fcbad37b2cce2585d4215
hwmon: (lm80) Fix missing unlock on error in set_fan_div()

commit 07bd14ccc3049f9c0147a91a4227a571f981601a upstream.

Add the missing unlock before return from function set_fan_div()
in the error handling case.

Fixes: c9c63915519b ("hwmon: (lm80) fix a missing check of the status of SMBus read")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/lm80.c