diff mbox series

[v3,2/5] dmaengine: ti: k3-udma: Fix BCDMA for case w/o BCHAN

Message ID 20221213164304.1126945-3-vigneshr@ti.com (mailing list archive)
State New, archived
Headers show
Series dmaengine: Add support for AM62A SoC DMAs | expand

Commit Message

Vignesh Raghavendra Dec. 13, 2022, 4:43 p.m. UTC
Reusing loop iterator fails if BCHAN is not present as iterator is
uninitialized

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
---
 drivers/dma/ti/k3-udma.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index ce8b80bb34d7..aa50d46fa856 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -4774,7 +4774,10 @@  static int bcdma_setup_resources(struct udma_dev *ud)
 				irq_res.desc[i].num = rm_res->desc[i].num;
 			}
 		}
+	} else {
+		i = 0;
 	}
+
 	if (ud->tchan_cnt) {
 		rm_res = tisci_rm->rm_ranges[RM_RANGE_TCHAN];
 		if (IS_ERR(rm_res)) {