Skip to content

Commit 0ab4331

Browse files
joehattorivinodkoul
authored andcommitted
dmaengine: ti: edma: make the loop condition simpler in edma_probe()
When i == ecc->num_tc, the edma_probe() calls of_parse_phandle_with_fixed_args() and breaks from the loop regardless of the return value. Since neither the returned value nor the output argument tc_args is used, set i < ecc->num_tc as the loop condition. Signed-off-by: Joe Hattori <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 66d88e1 commit 0ab4331

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/dma/ti/edma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2460,10 +2460,10 @@ static int edma_probe(struct platform_device *pdev)
24602460
goto err_reg1;
24612461
}
24622462

2463-
for (i = 0;; i++) {
2463+
for (i = 0; i < ecc->num_tc; i++) {
24642464
ret = of_parse_phandle_with_fixed_args(node, "ti,tptcs",
24652465
1, i, &tc_args);
2466-
if (ret || i == ecc->num_tc)
2466+
if (ret)
24672467
break;
24682468

24692469
ecc->tc_list[i].node = tc_args.np;

0 commit comments

Comments
 (0)