diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-11-23 19:00:32 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-11-24 12:57:42 +0000 |
commit | b79332ef9d61513d0ccda74a5161bb7c31851e9c (patch) | |
tree | 46203e2fcb83573563c8145b15169a379e7ea36b /drivers | |
parent | fffc84fd87d963a2ea77a125b8a6f5a3c9f3192d (diff) |
spi: Fix condition in the __spi_register_driver()
The recent commit 3f07657506df ("spi: deduplicate spi_match_id()
in __spi_register_driver()") inadvertently inverted a condition
that provokes a (harmless) warning:
WARNING KERN SPI driver mtd_dataflash has no spi_device_id for atmel,at45
Restore logic to avoid such warning to be issued.
Fixes: 3f07657506df ("spi: deduplicate spi_match_id() in __spi_register_driver()")
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20211123170034.41253-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/spi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 5bf680fcb170..8726309b3eaf 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -474,7 +474,7 @@ int __spi_register_driver(struct module *owner, struct spi_driver *sdrv) const struct spi_device_id *spi_id; spi_id = spi_match_id(sdrv->id_table, of_name); - if (!spi_id) + if (spi_id) continue; } else { if (strcmp(sdrv->driver.name, of_name) == 0) |