Skip to content

Commit aad757b

Browse files
Wei Yongjungregkh
authored andcommitted
test_firmware: fix missing unlock on error in config_num_requests_store()
commit a5e1923 upstream. Add the missing unlock before return from function config_num_requests_store() in the error handling case. Fixes: c92316b ("test_firmware: add batched firmware tests") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0db5de4 commit aad757b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎lib/test_firmware.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ static ssize_t config_num_requests_store(struct device *dev,
371371
if (test_fw_config->reqs) {
372372
pr_err("Must call release_all_firmware prior to changing config\n");
373373
rc = -EINVAL;
374+
mutex_unlock(&test_fw_mutex);
374375
goto out;
375376
}
376377
mutex_unlock(&test_fw_mutex);

0 commit comments

Comments
 (0)