[alsa-devel] [PATCH 2/2] soundwire: Testing the wrong variable
Dan Carpenter
dan.carpenter at oracle.com
Tue Jan 9 10:37:44 CET 2018
We should be using "status2" here instead of "status".
Fixes: b0a9c37b0178 ("soundwire: Add slave status handling")
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
index ac88031f7664..a5d41a4a1609 100644
--- a/drivers/soundwire/bus.c
+++ b/drivers/soundwire/bus.c
@@ -741,10 +741,10 @@ static int sdw_handle_port_interrupt(struct sdw_slave *slave,
/* Read DPN interrupt again */
status2 = sdw_read(slave, addr);
- if (status < 0) {
+ if (status2 < 0) {
dev_err(slave->bus->dev,
- "SDW_DPN_INT read failed:%d", status);
- return status;
+ "SDW_DPN_INT read failed:%d", status2);
+ return status2;
}
status &= status2;
More information about the Alsa-devel
mailing list