Skip to content

Commit

Permalink
ALSA: firewire-lib: fix inappropriate assignment between signed/unsig…
Browse files Browse the repository at this point in the history
…ned type

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>
Cc: <stable@vger.kernel.org> # 4.4+
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>
  • Loading branch information
takaswie authored and tiwai committed Apr 14, 2017
1 parent 4e7655f commit dfb00a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/firewire/lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct snd_fw_async_midi_port {

struct snd_rawmidi_substream *substream;
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,
Expand Down

0 comments on commit dfb00a5

Please sign in to comment.