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

Commit 0d174f5d authored by Edgar Flores's avatar Edgar Flores
Browse files

msm: adsprpc: Validate smmu device is created before using it



Validate that adsprpc driver does not use smmu device
before device gets probe.

Change-Id: Ica0ef5a6c3e4cabc731a0d71613e05e8a47c1622
Signed-off-by: default avatarEdgar Flores <edgarf@codeaurora.org>
parent 108427ae
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1133,9 +1133,11 @@ static int fastrpc_buf_alloc(struct fastrpc_file *fl, size_t size,
	struct fastrpc_buf *buf = NULL, *fr = NULL;
	struct hlist_node *n;

	VERIFY(err, size > 0);
	if (err)
	VERIFY(err, size > 0 && fl->sctx->smmu.dev);
	if (err) {
		err = (fl->sctx->smmu.dev == NULL) ? -ENODEV : err;
		goto bail;
	}

	if (!remote) {
		/* find the smallest buffer that fits in the cache */