From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: perex@perex.cz, tiwai@suse.com, broonie@kernel.org,
krzk@kernel.org, sbkim73@samsung.com, daniel@zonque.org,
haojian.zhuang@gmail.com, robert.jarzmik@free.fr,
lgirdwood@gmail.com
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 10/11] ASoC: pxa: Handle return value of clk_prepare_enable.
Date: Tue, 25 Jul 2017 15:46:09 +0530 [thread overview]
Message-ID: <1500977770-28142-1-git-send-email-arvind.yadav.cs@gmail.com> (raw)
clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
sound/soc/pxa/pxa2xx-i2s.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 3fb60ba..2312c22 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -164,10 +164,14 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct snd_dmaengine_dai_dma_data *dma_data;
+ int ret;
if (WARN_ON(IS_ERR(clk_i2s)))
return -EINVAL;
- clk_prepare_enable(clk_i2s);
+ ret = clk_prepare_enable(clk_i2s);
+ if (ret)
+ return ret;
+
clk_ena = 1;
pxa_i2s_wait();
--
1.9.1
next reply other threads:[~2017-07-25 10:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-25 10:16 Arvind Yadav [this message]
2017-07-25 10:16 ` [PATCH 11/11] ASoC: pxa-ssp: Handle return value of clk_prepare_enable Arvind Yadav
2017-08-11 19:08 ` Robert Jarzmik
2017-08-11 19:08 ` [PATCH 10/11] ASoC: pxa: " Robert Jarzmik
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=1500977770-28142-1-git-send-email-arvind.yadav.cs@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=daniel@zonque.org \
--cc=haojian.zhuang@gmail.com \
--cc=krzk@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=robert.jarzmik@free.fr \
--cc=sbkim73@samsung.com \
--cc=tiwai@suse.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).