Skip to content

Commit

Permalink
test_firmware: fix missing unlock on error in config_num_requests_sto…
Browse files Browse the repository at this point in the history
…re()

BugLink: http://bugs.launchpad.net/bugs/1747169

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>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
  • Loading branch information
Wei Yongjun authored and Seth Forshee committed Feb 3, 2018
1 parent 09197d8 commit a5befdc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/test_firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a5befdc

Please sign in to comment.