From: Andrew Jackson Date: Fri, 29 Aug 2014 14:02:38 +0000 (+0100) Subject: ASoC: dwc: Don't allow negative use counts X-Git-Tag: accepted/tizen/common/20141203.182822~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ee2331c1e21956509b4622dc26d76c1845793a2;p=platform%2Fkernel%2Flinux-arm64.git ASoC: dwc: Don't allow negative use counts Signed-off-by: Andrew Jackson --- diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c index d202c7c..bd2fcd7 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: