mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-01 09:36:49 +07:00
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
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user