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)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 15 Feb 2016 20:45:23 +0000 (15:45 -0500)
commit2c68386075ac61d3bedbc34491a0ed828ff832b9
treecb5ae4e80af805deb8d93c098117841641e61e71
parent593bd1058b30eb4f0d6949afdfd9c2659d94ae1e
ALSA: bebob: Use a signed return type for get_formation_index

[ Upstream commit 07905298e4d5777eb58516cdc242f7ac1ca387a2 ]

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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
sound/firewire/bebob/bebob_stream.c