[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <D373A44D.1446E%Paul.Handrigan@cirrus.com>
Date: Wed, 1 Jun 2016 01:28:25 +0000
From: "Handrigan, Paul" <Paul.Handrigan@...rus.com>
To: Nicolin Chen <nicoleotsuka@...il.com>,
"broonie@...nel.org" <broonie@...nel.org>
CC: "lgirdwood@...il.com" <lgirdwood@...il.com>,
"Austin, Brian" <Brian.Austin@...rus.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>
Subject: Re: [PATCH 2/2] ASoC: cs53l30: Check return value of regcache_sync()
On 5/31/16, 6:06 PM, "Nicolin Chen" <nicoleotsuka@...il.com> wrote:
>Regcache_sync() might fail. So this patch adds a return value Check for
>it.
>
>Signed-off-by: Nicolin Chen <nicoleotsuka@...il.com>
>---
> sound/soc/codecs/cs53l30.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
>diff --git a/sound/soc/codecs/cs53l30.c b/sound/soc/codecs/cs53l30.c
>index 9aff449..ac90dd7 100644
>--- a/sound/soc/codecs/cs53l30.c
>+++ b/sound/soc/codecs/cs53l30.c
>@@ -1055,7 +1055,11 @@ static int cs53l30_runtime_resume(struct device
>*dev)
> gpiod_set_value_cansleep(cs53l30->reset_gpio, 1);
>
> regcache_cache_only(cs53l30->regmap, false);
>- regcache_sync(cs53l30->regmap);
>+ ret = regcache_sync(cs53l30->regmap);
>+ if (ret) {
>+ dev_err(dev, "failed to synchronize regcache: %d\n", ret);
>+ return ret;
>+ }
>
> return 0;
> }
>--
>2.1.4
Acked-by: Paul Handrigan <Paul.Handrigan@...rus.com>
Powered by blists - more mailing lists