public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: SDCA: Fix bad move of jack_state initialisation
@ 2026-05-05  9:08 Charles Keepax
  2026-05-05 12:07 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Charles Keepax @ 2026-05-05  9:08 UTC (permalink / raw)
  To: broonie
  Cc: lgirdwood, yung-chuan.liao, pierre-louis.bossart, peter.ujfalusi,
	linux-sound, linux-kernel, patches

The initialisation of jack_state was accidentally moved until after its
use, correct this.

Fixes: cb3c257e0824 ("ASoC: SDCA: Add correct masks whilst reporting SDCA jack status")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 sound/soc/sdca/sdca_jack.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/sdca/sdca_jack.c b/sound/soc/sdca/sdca_jack.c
index a2d95b124b789..ae9636622a840 100644
--- a/sound/soc/sdca/sdca_jack.c
+++ b/sound/soc/sdca/sdca_jack.c
@@ -203,6 +203,8 @@ int sdca_jack_set_jack(struct sdca_interrupt_info *info, struct snd_soc_jack *ja
 			if (!range)
 				return -EINVAL;
 
+			jack_state = interrupt->priv;
+
 			for (j = 0; j < range->rows; j++) {
 				enum sdca_terminal_type type;
 
@@ -211,7 +213,6 @@ int sdca_jack_set_jack(struct sdca_interrupt_info *info, struct snd_soc_jack *ja
 				jack_state->mask |= type_get_mask(type);
 			}
 
-			jack_state = interrupt->priv;
 			jack_state->jack = jack;
 
 			/* Report initial state in case IRQ was already handled */
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-05 13:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-05  9:08 [PATCH] ASoC: SDCA: Fix bad move of jack_state initialisation Charles Keepax
2026-05-05 12:07 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox