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

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

Merge "msm: adsprpc: Clean DMA handles maps in case of error"

parents 193e986d 4152522f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1696,7 +1696,7 @@ static int get_args(uint32_t kernel, struct smq_invoke_ctx *ctx)
	uintptr_t args;
	size_t rlen = 0, copylen = 0, metalen = 0, lrpralen = 0;
	int i, oix;
	int err = 0;
	int err = 0, j = 0;
	int mflags = 0;
	uint64_t *fdlist;
	uint32_t *crclist;
@@ -1741,6 +1741,8 @@ static int get_args(uint32_t kernel, struct smq_invoke_ctx *ctx)
					FASTRPC_ATTR_NOVA, 0, 0, dmaflags,
					&ctx->maps[i]);
		if (err) {
			for (j = bufs; j < i; j++)
				fastrpc_mmap_free(ctx->maps[j], 0);
			mutex_unlock(&ctx->fl->map_mutex);
			goto bail;
		}