Re: [PATCH] spi: fix erroneous logic inversion in spi_match_id() usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 30, 2021 at 09:13:35PM +0100, Heiner Kallweit wrote:

> We want to continue in case of a match. Fix the erroneously inverted
> logic.

We do?  Why?  I can't tell from this changelog what the problem is or
why the patch would fix it.

> @@ -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)

This appears to correspond to the current code anyway?

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux