aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-11-23 01:14:07 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-23 09:29:11 -0500
commit7a479b02843c8d78ef51a64d1168592258440c97 (patch)
tree5bba297ba8b896be1e2160e46386209673e56d2a
parent92a5288501685bf05fc348ee2a3115a9bd9ae36f (diff)
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>
-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)
78 78
79 if (data->power_state) { 79 if (data->power_state) {
80 val = i2c_smbus_write_byte_data(tpa6130a2_client, reg, value); 80 val = i2c_smbus_write_byte_data(tpa6130a2_client, reg, value);
81 if (val < 0) 81 if (val < 0) {
82 dev_err(&tpa6130a2_client->dev, "Write failed\n"); 82 dev_err(&tpa6130a2_client->dev, "Write failed\n");
83 return val;
84 }
83 } 85 }
84 86
85 /* Either powered on or off, we save the context */ 87 /* Either powered on or off, we save the context */