diff options
| author | Murad Masimov <m.masimov@maxima.ru> | 2024-11-01 21:55:13 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-11-14 13:19:33 +0100 |
| commit | 57a9e9d71d77b7d1aef30489594ead8ef4ffe49a (patch) | |
| tree | a6e24252eea4e42e39ee14cbf43c2de2628c96e4 /sound/firewire | |
| parent | a8ce18094f4244867a48f05e0ad626f483254ac4 (diff) | |
| download | linux-57a9e9d71d77b7d1aef30489594ead8ef4ffe49a.tar.gz linux-57a9e9d71d77b7d1aef30489594ead8ef4ffe49a.tar.bz2 linux-57a9e9d71d77b7d1aef30489594ead8ef4ffe49a.zip | |
ALSA: firewire-lib: fix return value on fail in amdtp_tscm_init()
[ Upstream commit 8abbf1f01d6a2ef9f911f793e30f7382154b5a3a ]
If amdtp_stream_init() fails in amdtp_tscm_init(), the latter returns zero,
though it's supposed to return error code, which is checked inside
init_stream() in file tascam-stream.c.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 47faeea25ef3 ("ALSA: firewire-tascam: add data block processing layer")
Signed-off-by: Murad Masimov <m.masimov@maxima.ru>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20241101185517.1819-1-m.masimov@maxima.ru
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound/firewire')
| -rw-r--r-- | sound/firewire/tascam/amdtp-tascam.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/firewire/tascam/amdtp-tascam.c b/sound/firewire/tascam/amdtp-tascam.c index 0b42d6559008..079afa4bd381 100644 --- a/sound/firewire/tascam/amdtp-tascam.c +++ b/sound/firewire/tascam/amdtp-tascam.c @@ -238,7 +238,7 @@ int amdtp_tscm_init(struct amdtp_stream *s, struct fw_unit *unit, err = amdtp_stream_init(s, unit, dir, flags, fmt, process_ctx_payloads, sizeof(struct amdtp_tscm)); if (err < 0) - return 0; + return err; if (dir == AMDTP_OUT_STREAM) { // Use fixed value for FDF field. |
