Commit 04c8f2b
ASoC: hdac_hdmi: avoid reference to invalid variable of the pin list
Using pin list array iterator outside the iteration of the list can
point to dummy element, which can be invalid. So don't use pin variable
outside the pin list iteration.
This fixes the following coccinelle warning:
sound/soc/codecs/hdac_hdmi.c:1419:5-8: ERROR: invalid reference to the
index variable of the iterator
Fixes: 2acd830('ASoC: hdac_hdmi: Add support to handle MST capable pin')
Reported-by: Julia Lawall <[email protected]>
Signed-off-by: Jeeja KP <[email protected]>
Acked-by: Vinod Koul <[email protected]>
Signed-off-by: Mark Brown <[email protected]>1 parent c1ae3cf commit 04c8f2b
1 file changed
+4
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1534 | 1534 | | |
1535 | 1535 | | |
1536 | 1536 | | |
1537 | | - | |
1538 | 1537 | | |
1539 | 1538 | | |
1540 | 1539 | | |
1541 | 1540 | | |
1542 | 1541 | | |
1543 | | - | |
| 1542 | + | |
1544 | 1543 | | |
1545 | 1544 | | |
1546 | 1545 | | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
1547 | 1549 | | |
1548 | 1550 | | |
1549 | | - | |
1550 | | - | |
1551 | | - | |
1552 | 1551 | | |
1553 | 1552 | | |
1554 | 1553 | | |
| |||
0 commit comments