lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <051e22b4-49c0-5ef5-709c-015fe3f20cee@nvidia.com>
Date:   Tue, 23 Nov 2021 17:34:05 +0000
From:   Jon Hunter <jonathanh@...dia.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Mark Brown <broonie@...nel.org>, linux-spi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     "linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>
Subject: Re: [PATCH v3 1/3] spi: Fix condition in the __spi_register_driver()


On 23/11/2021 17:00, Andy Shevchenko wrote:
> 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@...dia.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
> v3: a fix-patch instead of previously applied one (Jon)
>   drivers/spi/spi.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
> index 9d19d9bae253..15688acc952c 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)
> 


Thanks for the quick fix. Works for me!

Tested-by: Jon Hunter <jonathanh@...dia.com>

Cheers
Jon

-- 
nvpublic

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ