Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a479b02 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

ASoC: Do not update the cache if write to hardware failed

parent 92a52885
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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 */