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

Commit 42372239 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 24024467 0d174f5d
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1136,9 +1136,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 */