aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.10/0195-snd-bcm2835-Ensure-alsa_stream-is-null-on-failure-to.patch
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2014-09-27 19:10:51 +0000
committerFlorian Fainelli <florian@openwrt.org>2014-09-27 19:10:51 +0000
commit6918ea2484861cbf806c812b95a814ab40063c05 (patch)
tree3f4d53baabebad9339cadd1bbfaaf07ed61b9c1e /target/linux/brcm2708/patches-3.10/0195-snd-bcm2835-Ensure-alsa_stream-is-null-on-failure-to.patch
parentff6b0d57b8e4dd9c72b13ac0586c523c8d6e8841 (diff)
downloadupstream-6918ea2484861cbf806c812b95a814ab40063c05.tar.gz
upstream-6918ea2484861cbf806c812b95a814ab40063c05.tar.bz2
upstream-6918ea2484861cbf806c812b95a814ab40063c05.zip
brcm2708: update 3.10 patches with raspberrypi/rpi-3.10.y of 27 Apr. 2014
Update the 3.10 rasperry patches by rebasing raspberry/rpi-3.10-y against linux-stable/v3.10.49. Signed-off-by: Florian Fainelli <florian@openwrt.org> SVN-Revision: 42678
Diffstat (limited to 'target/linux/brcm2708/patches-3.10/0195-snd-bcm2835-Ensure-alsa_stream-is-null-on-failure-to.patch')
-rw-r--r--target/linux/brcm2708/patches-3.10/0195-snd-bcm2835-Ensure-alsa_stream-is-null-on-failure-to.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-3.10/0195-snd-bcm2835-Ensure-alsa_stream-is-null-on-failure-to.patch b/target/linux/brcm2708/patches-3.10/0195-snd-bcm2835-Ensure-alsa_stream-is-null-on-failure-to.patch
new file mode 100644
index 0000000000..ab4a555950
--- /dev/null
+++ b/target/linux/brcm2708/patches-3.10/0195-snd-bcm2835-Ensure-alsa_stream-is-null-on-failure-to.patch
@@ -0,0 +1,41 @@
+From 08223128145b351a4d47b6d1780c13eac5d8df95 Mon Sep 17 00:00:00 2001
+From: popcornmix <popcornmix@gmail.com>
+Date: Sun, 27 Apr 2014 17:52:12 +0100
+Subject: [PATCH 195/196] snd-bcm2835: Ensure alsa_stream is null on failure to
+ avoid kernel panic
+
+---
+ sound/arm/bcm2835-pcm.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/sound/arm/bcm2835-pcm.c b/sound/arm/bcm2835-pcm.c
+index 499e225..54a8f87 100755
+--- a/sound/arm/bcm2835-pcm.c
++++ b/sound/arm/bcm2835-pcm.c
+@@ -136,6 +136,11 @@ static int snd_bcm2835_playback_open(struct snd_pcm_substream *substream)
+ alsa_stream->enable_fifo_irq = 0;
+ alsa_stream->fifo_irq_handler = bcm2835_playback_fifo_irq;
+
++ err = bcm2835_audio_open(alsa_stream);
++ if (err != 0) {
++ kfree(alsa_stream);
++ return err;
++ }
+ runtime->private_data = alsa_stream;
+ runtime->private_free = snd_bcm2835_playback_free;
+ runtime->hw = snd_bcm2835_playback_hw;
+@@ -143,11 +148,6 @@ static int snd_bcm2835_playback_open(struct snd_pcm_substream *substream)
+ snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
+ 16);
+
+- err = bcm2835_audio_open(alsa_stream);
+- if (err != 0) {
+- kfree(alsa_stream);
+- return err;
+- }
+ chip->alsa_stream[idx] = alsa_stream;
+
+ alsa_stream->open = 1;
+--
+1.9.1
+