mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ALSA: vmaster: Retry follower initialization on failure
@ 2026-11-26  7:22 Sreeraj S Kurup
  0 siblings, 0 replies; only message in thread
From: Sreeraj S Kurup @ 2026-11-26  7:22 UTC (permalink / raw)
  To: perex, tiwai; +Cc: linux-kernel, linux-sound, Sreeraj S Kurup

Reset the follower count when the initial follower update
fails.

This allows follower initialization to be retried on the
next access.

Signed-off-by: Sreeraj S Kurup <sreekuttan2156239@gmail.com>
---
 sound/core/vmaster.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/sound/core/vmaster.c b/sound/core/vmaster.c
index f43144ba2797..d97d7bb33e16 100644
--- a/sound/core/vmaster.c
+++ b/sound/core/vmaster.c
@@ -102,7 +102,14 @@ static int follower_init(struct link_follower *follower)
 	follower->info.min_val = uinfo->value.integer.min;
 	follower->info.max_val = uinfo->value.integer.max;
 
-	return follower_update(follower);
+	err = follower_update(follower);
+	if (err < 0) {
+		/* allow initialization to be retried */
+		follower->info.count = 0;
+		return err;
+	}
+
+	return 0;
 }
 
 /* initialize master volume */
-- 
2.55.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-26  7:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-26  7:22 [PATCH] ALSA: vmaster: Retry follower initialization on failure Sreeraj S Kurup

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

all inboxes | Powered by JetHome®