Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Geoffrey D. Bennett" <g@b4.vu>
To: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Subject: [PATCH] ALSA: scarlett2: Add missing check with firmware version control
Date: Fri, 27 Oct 2023 20:31:21 +1030	[thread overview]
Message-ID: <ZTuKcXajVnuelBEb@m.b4.vu> (raw)

scarlett2_add_firmware_version_ctl() may return an error, but the
return value was not being checked. Add the missing check.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
---
 sound/usb/mixer_scarlett2.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/usb/mixer_scarlett2.c b/sound/usb/mixer_scarlett2.c
index f6d1fdfa88e1..9803f3e426c6 100644
--- a/sound/usb/mixer_scarlett2.c
+++ b/sound/usb/mixer_scarlett2.c
@@ -4424,6 +4424,8 @@ static int snd_scarlett2_controls_create(
 
 	/* Add firmware version control */
 	err = scarlett2_add_firmware_version_ctl(mixer);
+	if (err < 0)
+		return err;
 
 	/* Read volume levels and controls from the interface */
 	err = scarlett2_read_configs(mixer);
-- 
2.41.0


             reply	other threads:[~2023-10-27 10:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27 10:01 Geoffrey D. Bennett [this message]
2023-10-27 10:34 ` [PATCH] ALSA: scarlett2: Add missing check with firmware version control Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZTuKcXajVnuelBEb@m.b4.vu \
    --to=g@b4.vu \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox