From: Takashi Sakamoto Date: Fri, 14 Apr 2017 03:43:01 +0000 (+0900) Subject: ALSA: firewire-lib: fix inappropriate assignment between signed/unsigned type X-Git-Tag: v4.12-rc1~6^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dfb00a56935186171abb5280b3407c3f910011f1;p=platform%2Fkernel%2Flinux-exynos.git ALSA: firewire-lib: fix inappropriate assignment between signed/unsigned 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 Cc: # 4.4+ Fixes: 585d7cba5e1f ("ALSA: firewire-lib: add helper functions for asynchronous transactions to transfer MIDI messages") Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai --- diff --git a/sound/firewire/lib.h b/sound/firewire/lib.h index f676931..c3768cd 100644 --- a/sound/firewire/lib.h +++ b/sound/firewire/lib.h @@ -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,