From: Yang Jie <yang.jie@linux.intel.com>
To: Alan <alan@linux.intel.com>,
linux-kernel@vger.kernel.org, Vinod Koul <vinod.koul@intel.com>
Subject: Re: [PATCH RESEND] sst: fix missing breaks that would cause the wrong operation to execute
Date: Thu, 7 Apr 2016 09:30:44 +0800 [thread overview]
Message-ID: <5705B844.7050101@linux.intel.com> (raw)
In-Reply-To: <20160406134353.9696.25425.stgit@localhost.localdomain>
On 2016年04月06日 21:44, Alan wrote:
> From: Alan <gnomes@lxorguk.ukuu.org.uk>
>
> Now we correctly error an attempt to execute an unsupported operation. The
> current code does something else random.
>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
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,
>
>
next prev parent reply other threads:[~2016-04-07 1:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-06 13:44 [PATCH RESEND] sst: fix missing breaks that would cause the wrong operation to execute Alan
2016-04-07 1:30 ` Yang Jie [this message]
2016-04-12 5:05 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5705B844.7050101@linux.intel.com \
--to=yang.jie@linux.intel.com \
--cc=alan@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).