mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 19:07:52 +00:00
ASoC: Squash error codes from regmap down to -1 on read
The ASoC code always uses -1 as the error code due to reporting errors in band with the value. Ensure we don't confuse anything by making sure we don't pass actual error codes back into the rest of the code on read. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
024dc07855
commit
3ebb5c9b10
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ static unsigned int hw_read(struct snd_soc_codec *codec, unsigned int reg)
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
return val;
|
return val;
|
||||||
else
|
else
|
||||||
return ret;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = snd_soc_cache_read(codec, reg, &val);
|
ret = snd_soc_cache_read(codec, reg, &val);
|
||||||
|
|
Loading…
Reference in a new issue