[alsa-devel] [PATCH] [v2] ASoC: cs4270: use the built-in register cache support

Mark Brown broonie at opensource.wolfsonmicro.com
Mon Jan 10 19:36:15 CET 2011


On Mon, Jan 10, 2011 at 12:33:30PM -0600, Timur Tabi wrote:

> static unsigned int snd_soc_16_16_read(struct snd_soc_codec *codec,
> 				       unsigned int reg)
> {
> ...
> 	ret = snd_soc_cache_read(codec, reg, &val);
> 	if (ret < 0)
> 		return -1;

> What's wrong with:

> 	if (ret < 0)
> 		return ret;

Note that the return value of the read functions is an unsigned int
rather than an int.


More information about the Alsa-devel mailing list