Messages in this thread | | | Subject | Re: [PATCH][next] net: phy: bcm54140: fix less than zero comparison on an unsigned | From | Colin Ian King <> | Date | Thu, 23 Apr 2020 15:38:08 +0100 |
| |
On 23/04/2020 15:37, Andrew Lunn wrote: > On Thu, Apr 23, 2020 at 03:10:16PM +0100, Colin King wrote: >> From: Colin Ian King <colin.king@canonical.com> >> >> Currently the unsigned variable tmp is being checked for an negative >> error return from the call to bcm_phy_read_rdb and this can never >> be true since tmp is unsigned. Fix this by making tmp a plain int. >> >> Addresses-Coverity: ("Unsigned compared against 0") > > I thought 0 was unsigned?
yeah, misleading message from the static analyzer methinks
> >> Fixes: 4406d36dfdf1 ("net: phy: bcm54140: add hwmon support") >> Signed-off-by: Colin Ian King <colin.king@canonical.com> > > Reviewed-by: Andrew Lunn <andrew@lunn.ch> > > Andrew >
| |