Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753877AbcDGBYG (ORCPT ); Wed, 6 Apr 2016 21:24:06 -0400 Received: from mga09.intel.com ([134.134.136.24]:63979 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752033AbcDGBYE (ORCPT ); Wed, 6 Apr 2016 21:24:04 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,448,1455004800"; d="scan'208";a="80521695" Subject: Re: [PATCH RESEND] sst: fix missing breaks that would cause the wrong operation to execute To: Alan , linux-kernel@vger.kernel.org, Vinod Koul References: <20160406134353.9696.25425.stgit@localhost.localdomain> From: Yang Jie Message-ID: <5705B844.7050101@linux.intel.com> Date: Thu, 7 Apr 2016 09:30:44 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20160406134353.9696.25425.stgit@localhost.localdomain> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2006 Lines: 57 On 2016年04月06日 21:44, Alan wrote: > From: Alan > > Now we correctly error an attempt to execute an unsupported operation. The > current code does something else random. > > Signed-off-by: Alan Cox I think this is nice fix. + Vinod who is the owner of the atom sound driver. Thanks, ~Keyon > --- > sound/soc/intel/atom/sst-mfld-platform-compress.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/sound/soc/intel/atom/sst-mfld-platform-compress.c b/sound/soc/intel/atom/sst-mfld-platform-compress.c > index 3951689..1bead81 100644 > --- a/sound/soc/intel/atom/sst-mfld-platform-compress.c > +++ b/sound/soc/intel/atom/sst-mfld-platform-compress.c > @@ -182,24 +182,29 @@ static int sst_platform_compr_trigger(struct snd_compr_stream *cstream, int cmd) > case SNDRV_PCM_TRIGGER_START: > if (stream->compr_ops->stream_start) > return stream->compr_ops->stream_start(sst->dev, stream->id); > + break; > case SNDRV_PCM_TRIGGER_STOP: > if (stream->compr_ops->stream_drop) > return stream->compr_ops->stream_drop(sst->dev, stream->id); > + break; > case SND_COMPR_TRIGGER_DRAIN: > if (stream->compr_ops->stream_drain) > return stream->compr_ops->stream_drain(sst->dev, stream->id); > + break; > case SND_COMPR_TRIGGER_PARTIAL_DRAIN: > if (stream->compr_ops->stream_partial_drain) > return stream->compr_ops->stream_partial_drain(sst->dev, stream->id); > + break; > case SNDRV_PCM_TRIGGER_PAUSE_PUSH: > if (stream->compr_ops->stream_pause) > return stream->compr_ops->stream_pause(sst->dev, stream->id); > + break; > case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: > if (stream->compr_ops->stream_pause_release) > return stream->compr_ops->stream_pause_release(sst->dev, stream->id); > - default: > - return -EINVAL; > + break; > } > + return -EINVAL; > } > > static int sst_platform_compr_pointer(struct snd_compr_stream *cstream, > >