diff options
author | Axel Lin <axel.lin@gmail.com> | 2010-11-23 14:14:07 +0800 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-11-23 14:29:11 +0000 |
commit | 7a479b02843c8d78ef51a64d1168592258440c97 (patch) | |
tree | 5bba297ba8b896be1e2160e46386209673e56d2a /sound | |
parent | 92a5288501685bf05fc348ee2a3115a9bd9ae36f (diff) | |
download | linux-7a479b02843c8d78ef51a64d1168592258440c97.tar.bz2 |
ASoC: Do not update the cache if write to hardware failed
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/tpa6130a2.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c index ee4fb201de60..d2c243095673 100644 --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c @@ -78,8 +78,10 @@ static int tpa6130a2_i2c_write(int reg, u8 value) if (data->power_state) { val = i2c_smbus_write_byte_data(tpa6130a2_client, reg, value); - if (val < 0) + if (val < 0) { dev_err(&tpa6130a2_client->dev, "Write failed\n"); + return val; + } } /* Either powered on or off, we save the context */ |