linux/drivers/net/dsa/sja1105
Colin Ian King 5425711b6d net: dsa: sja1105: fix check on while loop exit
The while-loop exit condition check is not correct; the
loop should continue if the returns from the function calls are
negative or the CRC status returns are invalid.  Currently it
is ignoring the returns from the function calls.  Fix this by
removing the status return checks and only break from the loop
at the very end when we know that all the success condtions have
been met.

Kudos to Dan Carpenter for describing the correct fix and
Vladimir Oltean for noting the change to the check on the number
of retries.

Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: 8aa9ebccae ("net: dsa: Introduce driver for NXP SJA1105 5-port L2 switch")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Tested-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-05-08 13:13:25 -07:00
..
Kconfig net: dsa: sja1105: Add support for traffic through standalone ports 2019-05-05 21:52:42 -07:00
Makefile net: dsa: sja1105: Add support for ethtool port counters 2019-05-03 10:49:17 -04:00
sja1105.h net: dsa: sja1105: Add support for traffic through standalone ports 2019-05-05 21:52:42 -07:00
sja1105_clocking.c net: dsa: sja1105: Error out if RGMII delays are requested in DT 2019-05-03 10:49:17 -04:00
sja1105_dynamic_config.c
sja1105_dynamic_config.h
sja1105_ethtool.c net: dsa: sja1105: Fix status initialization in sja1105_get_ethtool_stats 2019-05-07 12:20:46 -07:00
sja1105_main.c net: dsa: sja1105: Add support for Spanning Tree Protocol 2019-05-05 21:52:42 -07:00
sja1105_spi.c net: dsa: sja1105: fix check on while loop exit 2019-05-08 13:13:25 -07:00
sja1105_static_config.c net: dsa: sja1105: Add support for VLAN operations 2019-05-03 10:49:17 -04:00
sja1105_static_config.h net: dsa: sja1105: Add support for VLAN operations 2019-05-03 10:49:17 -04:00