kernel-fxtec-pro1x/drivers/of
Florian Fainelli e4c6078f09 of: of_mdio: Correct loop scanning logic
[ Upstream commit 5a8d7f126c97d04d893f5e5be2b286437a0d01b0 ]

Commit 209c65b61d94 ("drivers/of/of_mdio.c:fix of_mdiobus_register()")
introduced a break of the loop on the premise that a successful
registration should exit the loop. The premise is correct but not to
code, because rc && rc != -ENODEV is just a special error condition,
that means we would exit the loop even with rc == -ENODEV which is
absolutely not correct since this is the error code to indicate to the
MDIO bus layer that scanning should continue.

Fix this by explicitly checking for rc = 0 as the only valid condition
to break out of the loop.

Fixes: 209c65b61d94 ("drivers/of/of_mdio.c:fix of_mdiobus_register()")
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-07-22 09:32:03 +02:00
..
unittest-data of/unittest: Fix I2C bus unit-address error 2019-11-20 18:47:00 +01:00
address.c of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc 2020-02-11 04:34:03 -08:00
base.c of: make PowerMac cache node search conditional on CONFIG_PPC_PMAC 2019-11-20 18:46:06 +01:00
device.c of: Convert to using %pOFn instead of device_node.name 2019-02-06 17:30:15 +01:00
dynamic.c of: overlay: set node fields from properties when add new overlay node 2019-06-09 09:17:24 +02:00
fdt.c of/fdt: Remove PPC32 longtrail hack in memory scan 2018-08-07 12:05:54 -06:00
fdt_address.c
irq.c
Kconfig of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc 2020-02-11 04:34:03 -08:00
kobj.c of: Fix a refcounting bug in __of_attach_node_sysfs() 2020-06-25 15:33:00 +02:00
Makefile
of_mdio.c of: of_mdio: Correct loop scanning logic 2020-07-22 09:32:03 +02:00
of_net.c
of_numa.c of: Convert to using %pOFn instead of device_node.name 2019-02-06 17:30:15 +01:00
of_private.h of: __of_detach_node() - remove node from phandle cache 2019-01-13 09:51:10 +01:00
of_reserved_mem.c
overlay.c of: overlay: kmemleak in dup_and_fixup_symbol_prop() 2020-04-23 10:30:14 +02:00
pdt.c
platform.c of: Convert to using %pOFn instead of device_node.name 2019-02-06 17:30:15 +01:00
property.c OF: properties: add missing of_node_put 2019-01-22 21:40:33 +01:00
resolver.c
unittest.c of: unittest: kmemleak in of_unittest_overlay_high_level() 2020-04-23 10:30:14 +02:00