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

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

Merge "msm: ipa3: Check channel in right state before access base address"

parents 3fb34cbd ee632f5a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3819,6 +3819,11 @@ int __gsi_populate_tre(struct gsi_chan_ctx *ctx,
	tre.ieob = (xfer->flags & GSI_XFER_FLAG_EOB) ? 1 : 0;
	tre.chain = (xfer->flags & GSI_XFER_FLAG_CHAIN) ? 1 : 0;

	if (unlikely(ctx->state  == GSI_CHAN_STATE_NOT_ALLOCATED)) {
		GSIERR("bad state %d\n", ctx->state);
		return -GSI_STATUS_UNSUPPORTED_OP;
	}

	idx = gsi_find_idx_from_addr(&ctx->ring, ctx->ring.wp_local);
	tre_ptr = (struct gsi_tre *)(ctx->ring.base_va +
		idx * ctx->ring.elem_sz);