msm: adsprpc : Change to resolve undefined behaviour

Resolving the undefined behaviour scenario where if adsp proc
init fails return error and not to goto bail to deinitialize
memory and unlock mutex.

Change-Id: Idf107aa340a211edec9121249e090c3e7c0e2200
Acked-by: Gururaj Chalger <gchalger@qti.qualcomm.com>
Signed-off-by: Mohammed Nayeem Ur Rahman <mohara@codeaurora.org>
This commit is contained in:
Mohammed Nayeem Ur Rahman 2020-04-23 20:15:37 +05:30
commit 5cfc6d2291

View file

@ -3626,7 +3626,7 @@ static int fastrpc_internal_munmap(struct fastrpc_file *fl,
pr_err("adsprpc: ERROR: %s: user application %s trying to unmap without initialization\n",
__func__, current->comm);
err = EBADR;
goto bail;
return err;
}
mutex_lock(&fl->internal_map_mutex);