summaryrefslogtreecommitdiff
path: root/drivers/clk/hisilicon/clk-hip04.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2019-06-19 12:52:54 +0300
committerMark Brown <broonie@kernel.org>2019-06-19 13:54:29 +0300
commitb5e3cf410b486a2415ff09b12f3ef18aba9f53ff (patch)
treeff9288b12f6edc5d55cadc40b7626a439648fa2b /drivers/clk/hisilicon/clk-hip04.c
parentf56943699463478617b235930252261d5277bd46 (diff)
downloadlinux-b5e3cf410b486a2415ff09b12f3ef18aba9f53ff.tar.xz
spi/acpi: fix incorrect ACPI parent check
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@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Cc: andy.shevchenko@gmail.com Cc: masahisa.kojima@linaro.org Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com> Cc: linux-acpi@vger.kernel.org Cc: Lukas Wunner <lukas@wunner.de> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/clk/hisilicon/clk-hip04.c')
0 files changed, 0 insertions, 0 deletions