Commit 5de79ba8 authored by Bard Liao's avatar Bard Liao Committed by Vinod Koul

soundwire: bus: provide correct return value on error

It seems to be a typo. It makes more sense to return the return value
of sdw_update() instead of the value we want to update.
Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200227220949.4013-1-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent ed29a0a6
...@@ -1056,13 +1056,10 @@ static int sdw_initialize_slave(struct sdw_slave *slave) ...@@ -1056,13 +1056,10 @@ static int sdw_initialize_slave(struct sdw_slave *slave)
val |= SDW_DP0_INT_PORT_READY | SDW_DP0_INT_BRA_FAILURE; val |= SDW_DP0_INT_PORT_READY | SDW_DP0_INT_BRA_FAILURE;
ret = sdw_update(slave, SDW_DP0_INTMASK, val, val); ret = sdw_update(slave, SDW_DP0_INTMASK, val, val);
if (ret < 0) { if (ret < 0)
dev_err(slave->bus->dev, dev_err(slave->bus->dev,
"SDW_DP0_INTMASK read failed:%d\n", ret); "SDW_DP0_INTMASK read failed:%d\n", ret);
return val; return ret;
}
return 0;
} }
static int sdw_handle_dp0_interrupt(struct sdw_slave *slave, u8 *slave_status) static int sdw_handle_dp0_interrupt(struct sdw_slave *slave, u8 *slave_status)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment