Commit 8cbaf11c authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Greg Kroah-Hartman

ALSA: firewire-lib: fix inappropriate assignment between signed/unsigned type

commit dfb00a56 upstream.

An abstraction of asynchronous transaction for transmission of MIDI
messages was introduced in Linux v4.4. Each driver can utilize this
abstraction to transfer MIDI messages via fixed-length payload of
transaction to a certain unit address. Filling payload of the transaction
is done by callback. In this callback, each driver can return negative
error code, however current implementation assigns the return value to
unsigned variable.

This commit changes type of the variable to fix the bug.
Reported-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Fixes: 585d7cba ("ALSA: firewire-lib: add helper functions for asynchronous transactions to transfer MIDI messages")
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5e52fffb
...@@ -42,7 +42,7 @@ struct snd_fw_async_midi_port { ...@@ -42,7 +42,7 @@ struct snd_fw_async_midi_port {
struct snd_rawmidi_substream *substream; struct snd_rawmidi_substream *substream;
snd_fw_async_midi_port_fill fill; snd_fw_async_midi_port_fill fill;
unsigned int consume_bytes; int consume_bytes;
}; };
int snd_fw_async_midi_port_init(struct snd_fw_async_midi_port *port, int snd_fw_async_midi_port_init(struct snd_fw_async_midi_port *port,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment