]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
PCI: aardvark: Indicate error in 'val' when config read fails
authorPali Rohár <pali@kernel.org>
Mon, 1 Jun 2020 13:03:15 +0000 (15:03 +0200)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Wed, 27 Oct 2021 23:04:20 +0000 (17:04 -0600)
commit3237e7f3ec21e0c392243fe8f4f758b4b30e490e
tree04171e81d89cef4aff8a16332ea975058ebc2d2c
parentb1632ed15f460329b4175f3daada752a0f270b99
PCI: aardvark: Indicate error in 'val' when config read fails

BugLink: https://bugs.launchpad.net/bugs/1947885
commit b1bd5714472cc72e14409f5659b154c765a76c65 upstream.

Most callers of config read do not check for return value. But most of the
ones that do, checks for error indication in 'val' variable.

This patch updates error handling in advk_pcie_rd_conf() function. If PIO
transfer fails then 'val' variable is set to 0xffffffff which indicates
failture.

Link: https://lore.kernel.org/r/20200528162604.GA323482@bjorn-Precision-5520
Link: https://lore.kernel.org/r/20200601130315.18895-1-pali@kernel.org
Reported-by: Bjorn Helgaas <helgaas@kernel.org>
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/pci/controller/pci-aardvark.c