platform: nvadsp: Fix mismatched mutex lock/unlock

The function hasn't grabbed the mutex_lock yet at first
condition check. So this patch changes the exit path to
return directly instead of jumping to the mutex_unlock.

Bug 200444660

Change-Id: I122fc9cd145a5de932b4ae55d88c878231926072
Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2098217
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Nicolin Chen
2019-04-15 11:47:21 -07:00
committed by Laxman Dewangan
parent 9b6d089a5e
commit df7a7fb5ab

View File

@@ -849,8 +849,7 @@ int nvadsp_os_load(void)
if (!priv.pdev) {
pr_err("ADSP Driver is not initialized\n");
ret = -EINVAL;
goto end;
return -EINVAL;
}
mutex_lock(&priv.fw_load_lock);