lkml.org 
[lkml]   [2019]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH][V3] net: dsa: sja1105: fix check on while loop exit
From
From: Colin King <colin.king@canonical.com>
Date: Wed, 8 May 2019 14:30:41 +0100

> From: Colin Ian King <colin.king@canonical.com>
>
> 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>

Applied, thank you.

\
 
 \ /
  Last update: 2019-05-08 22:14    [W:0.046 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site