diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2024-05-08 15:07:00 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-27 14:49:05 +0300 |
commit | fe5a1bfad443c51805acbe60b21e710c38a1ccb0 (patch) | |
tree | 2b7cb6ba1b9cd6dbc28ae43664189849c0bcf52d /arch | |
parent | b89c2c56a01097243f38ae3c9d0d83efb0682ad8 (diff) | |
download | linux-fe5a1bfad443c51805acbe60b21e710c38a1ccb0.tar.xz |
MIPS: Routerboard 532: Fix vendor retry check code
[ Upstream commit ae9daffd9028f2500c9ac1517e46d4f2b57efb80 ]
read_config_dword() contains strange condition checking ret for a
number of values. The ret variable, however, is always zero because
config_access() never returns anything else. Thus, the retry is always
taken until number of tries is exceeded.
The code looks like it wants to check *val instead of ret to see if the
read gave an error response.
Fixes: 73b4390fb234 ("[MIPS] Routerboard 532: Support for base system")
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/pci/ops-rc32434.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/pci/ops-rc32434.c b/arch/mips/pci/ops-rc32434.c index 874ed6df9768..34b9323bdabb 100644 --- a/arch/mips/pci/ops-rc32434.c +++ b/arch/mips/pci/ops-rc32434.c @@ -112,8 +112,8 @@ retry: * gives them time to settle */ if (where == PCI_VENDOR_ID) { - if (ret == 0xffffffff || ret == 0x00000000 || - ret == 0x0000ffff || ret == 0xffff0000) { + if (*val == 0xffffffff || *val == 0x00000000 || + *val == 0x0000ffff || *val == 0xffff0000) { if (delay > 4) return 0; delay *= 2; |