summaryrefslogtreecommitdiff
path: root/net/unix
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-05-08 16:30:41 +0300
committerDavid S. Miller <davem@davemloft.net>2019-05-08 23:13:25 +0300
commit5425711b6dd0f7283202729863d9210e7a1c7cd2 (patch)
treef13ab349b614a4930789b83cd23ec03e0f0f13d1 /net/unix
parent86dc59e39031fb0d366d5b1f92db015b24bef70b (diff)
downloadlinux-5425711b6dd0f7283202729863d9210e7a1c7cd2.tar.xz
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: 8aa9ebccae87 ("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>
Diffstat (limited to 'net/unix')
0 files changed, 0 insertions, 0 deletions