Skip to content

Commit 38cd651

Browse files
bardliaovinodkoul
authored andcommitted
soundwire: only handle alert events when the peripheral is attached
It doesn't make sense to handle an alert event when the peripheral is not attached. The slave->status could be SDW_SLAVE_ATTACHED or SDW_SLAVE_ALERT when it is attached on the bus. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Link: https://patch.msgid.link/20260520025720.1999367-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 8a7fe10 commit 38cd651

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/soundwire/bus.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1958,6 +1958,10 @@ int sdw_handle_slave_status(struct sdw_bus *bus,
19581958
break;
19591959

19601960
case SDW_SLAVE_ALERT:
1961+
if (slave->status != SDW_SLAVE_ATTACHED &&
1962+
slave->status != SDW_SLAVE_ALERT)
1963+
continue;
1964+
19611965
ret = sdw_handle_slave_alerts(slave);
19621966
if (ret < 0)
19631967
dev_err(&slave->dev,

0 commit comments

Comments
 (0)