Skip to content

Commit 8cbaf11

Browse files
takaswiegregkh
authored andcommitted
ALSA: firewire-lib: fix inappropriate assignment between signed/unsigned type
commit dfb00a56935186171abb5280b3407c3f910011f1 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: Julia Lawall <Julia.Lawall@lip6.fr> Fixes: 585d7cb ("ALSA: firewire-lib: add helper functions for asynchronous transactions to transfer MIDI messages") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 5e52fff commit 8cbaf11

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/firewire/lib.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct snd_fw_async_midi_port {
4242

4343
struct snd_rawmidi_substream *substream;
4444
snd_fw_async_midi_port_fill fill;
45-
unsigned int consume_bytes;
45+
int consume_bytes;
4646
};
4747

4848
int snd_fw_async_midi_port_init(struct snd_fw_async_midi_port *port,

0 commit comments

Comments
 (0)