Skip to content

Commit 23e0cbe

Browse files
mstrozekbroonie
authored andcommitted
ASoC: SDCA: Fix overwritten var within for loop
mask variable should not be overwritten within the for loop or it will skip certain bits. Change to using BIT() macro. Fixes: b9ab3b6 ("ASoC: SDCA: Add some initial IRQ handlers") Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260408093835.2881486-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 0669631 commit 23e0cbe

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

sound/soc/sdca/sdca_interrupts.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,7 @@ static irqreturn_t function_status_handler(int irq, void *data)
117117

118118
status = val;
119119
for_each_set_bit(mask, &status, BITS_PER_BYTE) {
120-
mask = 1 << mask;
121-
122-
switch (mask) {
120+
switch (BIT(mask)) {
123121
case SDCA_CTL_ENTITY_0_FUNCTION_NEEDS_INITIALIZATION:
124122
//FIXME: Add init writes
125123
break;

0 commit comments

Comments
 (0)