]> git.baikalelectronics.ru Git - 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Sep 2021 12:07:04 +0000 (14:07 +0200)
commit9805a63ad0d7e30dd64413f81cdf84584c520f61
treea90c184b3b63c814baf170ab3bee30a054740ab5
parent422eb28f5c0fc8df0f802ab60d39383a2f4a79e4
PCI: aardvark: Indicate error in 'val' when config read fails

commit df7a57322f2fd77ddd441b4438dde2512d3ba149 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>
drivers/pci/controller/pci-aardvark.c