diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 46885429928a..4ec29338ce9a 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -705,7 +705,7 @@ static int sdw_program_device_num(struct sdw_bus *bus) struct sdw_slave *slave, *_s; struct sdw_slave_id id; struct sdw_msg msg; - bool found = false; + bool found; int count = 0, ret; u64 addr; @@ -737,6 +737,7 @@ static int sdw_program_device_num(struct sdw_bus *bus) sdw_extract_slave_id(bus, addr, &id); + found = false; /* Now compare with entries */ list_for_each_entry_safe(slave, _s, &bus->slaves, node) { if (sdw_compare_devid(slave, id) == 0) {