OSDN Git Service

ALSA: firewire-lib: fix inappropriate assignment between signed/unsigned type
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Fri, 14 Apr 2017 03:43:01 +0000 (12:43 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 May 2017 04:19:55 +0000 (21:19 -0700)
commit8cbaf11c5026abed0f772b6478795c7170d70171
tree18746f093141bef66f91889d5533f041f0249423
parent5e52fffbb11c28c37fe8e335fdd8e9705daff06d
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: 585d7cba5e1f ("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>
sound/firewire/lib.h