ALSA: bebob: Use a signed return type for get_formation_index
authorLucas Tanure <tanure@linux.com>
Mon, 25 Jan 2016 21:30:23 +0000 (19:30 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Feb 2016 20:30:58 +0000 (12:30 -0800)
commit2f32c8c003b35510b4b4515e70046e6a6e5967ca
tree4debca0007b621edf359719f94acafca96e4a488
parentfbb430c51d7ac989b79bf1adb40cce7af581682a
ALSA: bebob: Use a signed return type for get_formation_index

commit 07905298e4d5777eb58516cdc242f7ac1ca387a2 upstream.

The return type "unsigned int" was used by the get_formation_index function
despite of the aspect that it will eventually return a negative error code.
So, change to signed int and get index by reference in the parameters.

Done with the help of Coccinelle.

[Fix the missing braces suggested by Julia Lawall -- tiwai]

Signed-off-by: Lucas Tanure <tanure@linux.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Tested-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/bebob/bebob_stream.c