summaryrefslogtreecommitdiffstats
path: root/lib/test_firmware.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2018-01-11 06:12:55 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-22 10:55:38 -0500
commita5e1923356505e46476c2fb518559b7a4d9d25b1 (patch)
tree99c8457d4e34c65931aa38d13bb41b1121d9d88b /lib/test_firmware.c
parent76f8ab1bd1cb0be3233ab07790c3108d986aeabf (diff)
test_firmware: fix missing unlock on error in config_num_requests_store()
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") Cc: stable <stable@vger.kernel.org> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/test_firmware.c')
-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 1e907dd3b4fe..078a61480573 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,
371 if (test_fw_config->reqs) { 371 if (test_fw_config->reqs) {
372 pr_err("Must call release_all_firmware prior to changing config\n"); 372 pr_err("Must call release_all_firmware prior to changing config\n");
373 rc = -EINVAL; 373 rc = -EINVAL;
374 mutex_unlock(&test_fw_mutex);
374 goto out; 375 goto out;
375 } 376 }
376 mutex_unlock(&test_fw_mutex); 377 mutex_unlock(&test_fw_mutex);