forked from Minki/linux
spi: Fix condition in the __spi_register_driver()
The recent commit3f07657506
("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:3f07657506
("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>
This commit is contained in:
parent
fffc84fd87
commit
b79332ef9d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user