Skip to content

Commit

Permalink
misc: fastrpc: fix error code in fastrpc_req_mmap()
Browse files Browse the repository at this point in the history
The "err" variable shadows an earlier global variable so this code
returns success instead of a negative error code.

Fixes: 532ad70 ("misc: fastrpc: Add mmap request assigning for static PD pool")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/Y4XUrMETCl1O6t0A@kili
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Jan 20, 2023
1 parent 0c4d682 commit 5023adc
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/misc/fastrpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5023adc

Please sign in to comment.