spi: Fix condition in the __spi_register_driver()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 23 Nov 2021 17:00:32 +0000 (19:00 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 24 Nov 2021 12:57:42 +0000 (12:57 +0000)
commitb79332ef9d61513d0ccda74a5161bb7c31851e9c
tree46203e2fcb83573563c8145b15169a379e7ea36b
parentfffc84fd87d963a2ea77a125b8a6f5a3c9f3192d
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>
drivers/spi/spi.c