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>
This commit is contained in:
parent
92a5288501
commit
7a479b0284
1 changed files with 3 additions and 1 deletions
|
@ -78,8 +78,10 @@ static int tpa6130a2_i2c_write(int reg, u8 value)
|
||||||
|
|
||||||
if (data->power_state) {
|
if (data->power_state) {
|
||||||
val = i2c_smbus_write_byte_data(tpa6130a2_client, reg, value);
|
val = i2c_smbus_write_byte_data(tpa6130a2_client, reg, value);
|
||||||
if (val < 0)
|
if (val < 0) {
|
||||||
dev_err(&tpa6130a2_client->dev, "Write failed\n");
|
dev_err(&tpa6130a2_client->dev, "Write failed\n");
|
||||||
|
return val;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Either powered on or off, we save the context */
|
/* Either powered on or off, we save the context */
|
||||||
|
|
Loading…
Reference in a new issue