[PATCH 2/2] soundwire: Testing the wrong variable

Dan Carpenter
2018-01-09T09:37:44Z

We should be using "status2" here instead of "status".

Fixes: b0a9c37b0178 ("soundwire: Add slave status handling")
Signed-off-by: Dan Carpenter <dan.carpenter@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;