Skip to content

Commit 8abbf1f

Browse files
Murad Masimovtiwai
authored andcommitted
ALSA: firewire-lib: fix return value on fail in amdtp_tscm_init()
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: 47faeea ("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
1 parent c2d188e commit 8abbf1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/firewire/tascam/amdtp-tascam.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ int amdtp_tscm_init(struct amdtp_stream *s, struct fw_unit *unit,
238238
err = amdtp_stream_init(s, unit, dir, flags, fmt,
239239
process_ctx_payloads, sizeof(struct amdtp_tscm));
240240
if (err < 0)
241-
return 0;
241+
return err;
242242

243243
if (dir == AMDTP_OUT_STREAM) {
244244
// Use fixed value for FDF field.

0 commit comments

Comments
 (0)