[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <547F3C9F.8080102@arm.com>
Date: Wed, 03 Dec 2014 16:38:55 +0000
From: Andrew Jackson <Andrew.Jackson@....com>
To: Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>
CC: "alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Rajeev Kumar <rajeevkumar.linux@...il.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Liviu Dudau <Liviu.Dudau@....com>
Subject: [PATCH 2/5] ASoC: dwc: Don't allow negative use counts
Signed-off-by: Andrew Jackson <Andrew.Jackson@....com>
---
sound/soc/dwc/designware_i2s.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c
index 08f0229..f8946bd 100644
--- a/sound/soc/dwc/designware_i2s.c
+++ b/sound/soc/dwc/designware_i2s.c
@@ -280,7 +280,8 @@ static int dw_i2s_trigger(struct snd_pcm_substream *substream,
case SNDRV_PCM_TRIGGER_STOP:
case SNDRV_PCM_TRIGGER_SUSPEND:
case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
- dev->active--;
+ if (dev->active > 0)
+ dev->active--;
i2s_stop(dev, substream);
break;
default:
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists