ALSA: firewire-lib: fix invalid assignment to union data for directional parameter
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Fri, 8 May 2020 04:36:26 +0000 (13:36 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:48:42 +0000 (17:48 +0200)
commita98f8a0edd6f50150eb43e6b3c5208fc705e950b
treec5b9e368bad4d621a56eba3e7cf2366e2f49d03d
parent48af7ce3128cc2d5cff9d6e92fe60b38a4adf3a3
ALSA: firewire-lib: fix invalid assignment to union data for directional parameter

[ Upstream commit 8304cf77c92038cd1c50c27b69d30be695cc8003 ]

Although the value of FDF is used just for outgoing stream, the assignment
to union member is done for both directions of stream. At present this
causes no issue because the value of same position is reassigned later for
opposite stream. However, it's better to add if statement.

Fixes: d3d10a4a1b19 ("ALSA: firewire-lib: use union for directional parameters")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200508043635.349339-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/firewire/amdtp-am824.c