Skip to contentSkip to conversation

misc: fastrpc: fix error code in fastrpc_req_mmap()

PATCH New Dan Carpenter 1 participant 1 message Nov 29, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 532ad70c6d44 ("misc: fastrpc: Add mmap request assigning for static PD pool")
---
 drivers/misc/fastrpc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/misc/fastrpc.c +0 -1
index c9902a1dcf5d..876f0f146b16 100644
@@ -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;
Signature · 1 line
2.35.1