Commit 5023adc3 authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman

misc: fastrpc: fix error code in fastrpc_req_mmap()

The "err" variable shadows an earlier global variable so this code
returns success instead of a negative error code.

Fixes: 532ad70c ("misc: fastrpc: Add mmap request assigning for static PD pool")
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/Y4XUrMETCl1O6t0A@kiliSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0c4d6826
......@@ -1894,7 +1894,6 @@ static int fastrpc_req_mmap(struct fastrpc_user *fl, char __user *argp)
/* Add memory to static PD pool, protection thru hypervisor */
if (req.flags != ADSP_MMAP_REMOTE_HEAP_ADDR && fl->cctx->vmcount) {
struct qcom_scm_vmperm perm;
int err = 0;
perm.vmid = QCOM_SCM_VMID_HLOS;
perm.perm = QCOM_SCM_PERM_RWX;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment