]> www.infradead.org Git - users/jedix/linux-maple.git/commit
MIPS: Routerboard 532: Fix vendor retry check code
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 8 May 2024 12:07:00 +0000 (15:07 +0300)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Tue, 11 Jun 2024 14:04:55 +0000 (16:04 +0200)
commitae9daffd9028f2500c9ac1517e46d4f2b57efb80
treef5aa79f9be663ecc6fedb103c71799521d53fe0d
parent83a7eefedc9b56fe7bfeff13b6c7356688ffa670
MIPS: Routerboard 532: Fix vendor retry check code

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>
arch/mips/pci/ops-rc32434.c