Unverified Commit 23e0cbe5 authored by Maciej Strozek's avatar Maciej Strozek Committed by Mark Brown
Browse files

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: b9ab3b61 ("ASoC: SDCA: Add some initial IRQ handlers")
Signed-off-by: default avatarMaciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260408093835.2881486-2-ckeepax@opensource.cirrus.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0669631d
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -117,9 +117,7 @@ static irqreturn_t function_status_handler(int irq, void *data)

	status = val;
	for_each_set_bit(mask, &status, BITS_PER_BYTE) {
		mask = 1 << mask;

		switch (mask) {
		switch (BIT(mask)) {
		case SDCA_CTL_ENTITY_0_FUNCTION_NEEDS_INITIALIZATION:
			//FIXME: Add init writes
			break;