Skip to content
Commit d356dbe2 authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller
Browse files

net: pcs: xpcs: Fix a less than zero u16 comparison error



Currently the check for the u16 variable val being less than zero is
always false because val is unsigned. Fix this by using the int
variable for the assignment and less than zero check.

Addresses-Coverity: ("Unsigned compared against 0")
Fixes: f7380bba ("net: pcs: xpcs: add support for NXP SJA1110")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0c337952
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment