Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80be7d6a authored by Tharun Kumar Merugu's avatar Tharun Kumar Merugu
Browse files

msm: ADSPRPC: Fix for NULL pointer dereference



verify fl->sctx to avoid NULL pointer dereference
in fastrpc_device_ioctl

Change-Id: Ie6e45d4e5ddbfb592bf2a891730aab071ffbd538
Acked-by: default avatarChenna Kesava Raju <chennak@qti.qualcomm.com>
Signed-off-by: default avatarTharun Kumar Merugu <mtharu@codeaurora.org>
parent 1996ec83
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -2235,6 +2235,9 @@ static int fastrpc_get_info(struct fastrpc_file *fl, uint32_t *info)
		if (err)
		if (err)
			goto bail;
			goto bail;
	}
	}
	VERIFY(err, fl->sctx != NULL);
	if (err)
		goto bail;
	*info = (fl->sctx->smmu.enabled ? 1 : 0);
	*info = (fl->sctx->smmu.enabled ? 1 : 0);
bail:
bail:
	return err;
	return err;