Re: [PATCH][next] usb: typec: mux: fix an unsigned less than zero check

2019-02-19 Thread Heikki Krogerus
On Tue, Feb 19, 2019 at 03:19:18PM +, Colin King wrote: > From: Colin Ian King > > The checks of a negative nval indicating an error an never be true > as nval is currently a size_t which is of course unsigned and hence > never less than zero. Fix this by making nval an int. > > Detected by

[PATCH][next] usb: typec: mux: fix an unsigned less than zero check

2019-02-19 Thread Colin King
From: Colin Ian King The checks of a negative nval indicating an error an never be true as nval is currently a size_t which is of course unsigned and hence never less than zero. Fix this by making nval an int. Detected by CoverityScan, CID#1476863 ("Unsigned compared against 0) and CID#1476948