Skip to content
Snippets Groups Projects
Commit 2df76b10 authored by Murad Masimov's avatar Murad Masimov Committed by Greg Kroah-Hartman
Browse files

ALSA: firewire-lib: fix return value on fail in amdtp_tscm_init()


[ Upstream commit 8abbf1f0 ]

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: 47faeea2 ("ALSA: firewire-tascam: add data block processing layer")
Signed-off-by: default avatarMurad Masimov <m.masimov@maxima.ru>
Reviewed-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20241101185517.1819-1-m.masimov@maxima.ru


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 31e562e5
No related branches found
No related tags found
2 merge requests!186🤖 Sync Bot: Update v5.4-ktn to Latest Stable Kernel (v5.4.290),!174🤖 Sync Bot: Update v5.4-ktn to Latest Stable Kernel (v5.4.286)
......@@ -244,7 +244,7 @@ int amdtp_tscm_init(struct amdtp_stream *s, struct fw_unit *unit,
CIP_NONBLOCKING | CIP_SKIP_DBC_ZERO_CHECK, 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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment