Skip to content

Commit

Permalink
ASoC: Squash error codes from regmap down to -1 on read
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Oct 9, 2011
1 parent 024dc07 commit 3ebb5c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/soc-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static unsigned int hw_read(struct snd_soc_codec *codec, unsigned int reg)
if (ret == 0)
return val;
else
return ret;
return -1;
}

ret = snd_soc_cache_read(codec, reg, &val);
Expand Down

0 comments on commit 3ebb5c9

Please sign in to comment.