aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-11-23 14:14:07 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-23 14:29:11 +0000
commit7a479b02843c8d78ef51a64d1168592258440c97 (patch)
tree5bba297ba8b896be1e2160e46386209673e56d2a /sound
parentASoC: MPC5200: Eliminate duplicate include of of_device.h (diff)
downloadlinux-dev-7a479b02843c8d78ef51a64d1168592258440c97.tar.xz
linux-dev-7a479b02843c8d78ef51a64d1168592258440c97.zip
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.c4
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 */