summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2018-01-11 11:12:55 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-03 17:39:24 +0100
commitaad757b657176409e803b487bb76becf729a4a58 (patch)
treec227ed486c5f4e6b64b28b48c5da8dc318c0f759 /lib
parent0db5de4f4e1884c0ceb246bbcf450fbfd01881f7 (diff)
downloadlinux-exynos-aad757b657176409e803b487bb76becf729a4a58.tar.gz
linux-exynos-aad757b657176409e803b487bb76becf729a4a58.tar.bz2
linux-exynos-aad757b657176409e803b487bb76becf729a4a58.zip
test_firmware: fix missing unlock on error in config_num_requests_store()
commit a5e1923356505e46476c2fb518559b7a4d9d25b1 upstream. Add the missing unlock before return from function config_num_requests_store() in the error handling case. Fixes: c92316bf8e94 ("test_firmware: add batched firmware tests") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/test_firmware.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/test_firmware.c b/lib/test_firmware.c
index 64a4c76cba2b..e7008688769b 100644
--- a/lib/test_firmware.c
+++ b/lib/test_firmware.c
@@ -371,6 +371,7 @@ static ssize_t config_num_requests_store(struct device *dev,
if (test_fw_config->reqs) {
pr_err("Must call release_all_firmware prior to changing config\n");
rc = -EINVAL;
+ mutex_unlock(&test_fw_mutex);
goto out;
}
mutex_unlock(&test_fw_mutex);