1
0
Fork 0

test_firmware: fix missing unlock on error in config_num_requests_store()

commit a5e1923356 upstream.

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

Fixes: c92316bf8e ("test_firmware: add batched firmware tests")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
pull/10/head
Wei Yongjun 2018-01-11 11:12:55 +00:00 committed by Greg Kroah-Hartman
parent 0db5de4f4e
commit aad757b657
1 changed files with 1 additions and 0 deletions

View File

@ -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);