[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200109203819.GG3702@sirena.org.uk>
Date: Thu, 9 Jan 2020 20:38:19 +0000
From: Mark Brown <broonie@...nel.org>
To: Peter Seiderer <ps.report@....net>
Cc: linux-kernel@...r.kernel.org, alsa-devel@...a-project.org,
Annaliese McDermond <nh6z@...z.net>,
Takashi Iwai <tiwai@...e.com>,
Jaroslav Kysela <perex@...ex.cz>,
Liam Girdwood <lgirdwood@...il.com>
Subject: Re: [PATCH v1] ASoC: tlv320aic32x4: handle regmap_read error
gracefully
On Fri, Dec 27, 2019 at 04:20:56PM +0100, Peter Seiderer wrote:
> @@ -338,7 +338,8 @@ static unsigned long clk_aic32x4_div_recalc_rate(struct clk_hw *hw,
> unsigned int val;
> - regmap_read(div->regmap, div->reg, &val);
> + if (regmap_read(div->regmap, div->reg, &val))
> + return 0;
Is this the best fix - shouldn't we be returning an error here? We
don't know what the value programmed into the device actually is so zero
might be wrong, and we still have the risk that the value we read from
the device may be zero if the device is misprogrammed.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists