We want to continue in case of a match. Fix the erroneously inverted logic. Fixes: 3f07657506df ("spi: deduplicate spi_match_id() in __spi_register_driver()") Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx> --- drivers/spi/spi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 5bf680fcb..4578c2fb5 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -471,10 +471,7 @@ int __spi_register_driver(struct module *owner, struct spi_driver *sdrv) of_name = of_id->compatible; if (sdrv->id_table) { - const struct spi_device_id *spi_id; - - spi_id = spi_match_id(sdrv->id_table, of_name); - if (!spi_id) + if (spi_match_id(sdrv->id_table, of_name)) continue; } else { if (strcmp(sdrv->driver.name, of_name) == 0) -- 2.34.1