Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2f5e9d2 authored by Frederik Deweerdt's avatar Frederik Deweerdt Committed by Greg Kroah-Hartman
Browse files

Staging: line6: ffzb returns an unsigned integer



find_first_zero_bit returns a positive value, use it accordingly.

Signed-off-by: default avatarFrederik Deweerdt <frederik.deweerdt@xprog.eu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e1769b3c
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -26,7 +26,7 @@
*/
*/
static int submit_audio_in_urb(struct snd_pcm_substream *substream)
static int submit_audio_in_urb(struct snd_pcm_substream *substream)
{
{
	int index;
	unsigned int index;
	unsigned long flags;
	unsigned long flags;
	struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream);
	struct snd_line6_pcm *line6pcm = snd_pcm_substream_chip(substream);
	int i, urb_size;
	int i, urb_size;
@@ -35,7 +35,7 @@ static int submit_audio_in_urb(struct snd_pcm_substream *substream)
	spin_lock_irqsave(&line6pcm->lock_audio_in, flags);
	spin_lock_irqsave(&line6pcm->lock_audio_in, flags);
	index = find_first_zero_bit(&line6pcm->active_urb_in, LINE6_ISO_BUFFERS);
	index = find_first_zero_bit(&line6pcm->active_urb_in, LINE6_ISO_BUFFERS);


	if (index < 0 || index >= LINE6_ISO_BUFFERS) {
	if (index >= LINE6_ISO_BUFFERS) {
		spin_unlock_irqrestore(&line6pcm->lock_audio_in, flags);
		spin_unlock_irqrestore(&line6pcm->lock_audio_in, flags);
		dev_err(s2m(substream), "no free URB found\n");
		dev_err(s2m(substream), "no free URB found\n");
		return -EINVAL;
		return -EINVAL;