lkml.org 
[lkml]   [2017]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH][next] net: phy: mdio-bcm-unimac: fix unsigned wrap-around when decrementing timeout
From
From: Colin King <colin.king@canonical.com>
Date: Tue, 8 Aug 2017 10:52:32 +0100

> From: Colin Ian King <colin.king@canonical.com>
>
> Change post-decrement compare to pre-decrement to avoid an
> unsigned integer wrap-around on timeout. This leads to the following
> !timeout check to never to be true so -ETIMEDOUT is never returned.
>
> Detected by CoverityScan, CID#1452623 ("Logically dead code")
>
> Fixes: 69a60b0579a4 ("net: phy: mdio-bcm-unimac: factor busy polling loop")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

\
 
 \ /
  Last update: 2017-08-09 06:08    [W:0.024 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site