Patch "ALSA: oxfw: fix a condition and return code in start_stream()" has been added to the 3.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ALSA: oxfw: fix a condition and return code in start_stream()

to the 3.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-oxfw-fix-a-condition-and-return-code-in-start_stream.patch
and it can be found in the queue-3.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From f2b14c0bc510c6a8f67a4f36049deefe5d99a537 Mon Sep 17 00:00:00 2001
From: Takashi Sakamoto <o-takashi@xxxxxxxxxxxxx>
Date: Fri, 27 Feb 2015 09:39:32 +0900
Subject: ALSA: oxfw: fix a condition and return code in start_stream()

From: Takashi Sakamoto <o-takashi@xxxxxxxxxxxxx>

commit f2b14c0bc510c6a8f67a4f36049deefe5d99a537 upstream.

The amdtp_stream_wait_callback() doesn't return minus value and
the return code is not for error code.

This commit fixes with a propper condition and an error code.

Fixes: f3699e2c7745 ('ALSA: oxfw: Change the way to start stream')
Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Signed-off-by: Takashi Sakamoto <o-takashi@xxxxxxxxxxxxx>
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 sound/firewire/oxfw/oxfw-stream.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/sound/firewire/oxfw/oxfw-stream.c
+++ b/sound/firewire/oxfw/oxfw-stream.c
@@ -171,9 +171,10 @@ static int start_stream(struct snd_oxfw
 	}
 
 	/* Wait first packet */
-	err = amdtp_stream_wait_callback(stream, CALLBACK_TIMEOUT);
-	if (err < 0)
+	if (!amdtp_stream_wait_callback(stream, CALLBACK_TIMEOUT)) {
 		stop_stream(oxfw, stream);
+		err = -ETIMEDOUT;
+	}
 end:
 	return err;
 }


Patches currently in stable-queue which might be from o-takashi@xxxxxxxxxxxxx are

queue-3.19/alsa-oxfw-fix-a-condition-and-return-code-in-start_stream.patch
queue-3.19/alsa-firewire-lib-remove-reference-counting.patch
queue-3.19/alsa-fireworks-bebob-dice-oxfw-make-it-possible-to-shutdown-safely.patch
queue-3.19/alsa-fireworks-bebob-dice-oxfw-add-reference-counting-for-firewire-unit.patch
queue-3.19/alsa-fireworks-bebob-dice-oxfw-allow-stream-destructor-after-releasing-runtime.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]