Re: [PATCH] spi/acpi: fix incorrect ACPI parent check

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

 



On Wed, Jun 19, 2019 at 11:52:54AM +0200, Ard Biesheuvel wrote:
> The ACPI device object parsing code for SPI slaves enumerates the
> entire ACPI namespace to look for devices that refer to the master
> in question via the 'resource_source' field in the 'SPISerialBus'
> resource. If that field does not refer to a valid ACPI device or
> if it refers to the wrong SPI master, we should disregard the
> device.
> 
> Current, the valid device check is wrong, since it gets the
> polarity of 'status' wrong. This could cause issues if the
> 'resource_source' field is bogus but parent_handle happens to
> refer to the correct master (which is not entirely imaginary
> since this code runs in a loop)
> 
> So test for ACPI_FAILURE() instead, to make the code more
> self explanatory.
> 
> Fixes: 4c3c59544f33 ("spi/acpi: enumerate all SPI slaves in the namespace")
> Reported-by: kbuild test robot <lkp@xxxxxxxxx>
> Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Cc: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>

Acked-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>



[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