diff options
author | YueHaibing <[email protected]> | 2019-02-19 14:57:50 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2019-02-19 14:26:45 +0100 |
commit | 4e46f271c37415323f2b650d02ef50c87ff8d092 (patch) | |
tree | d22ec27b2a2a35735f4bb13b874a614743de89fc /lib/mpi/mpi-cmp.c | |
parent | dc8b2a691dc8f25ca6764236ed27df7c87239dd9 (diff) |
usb: typec: mux: Fix unsigned comparison with less than zero
The return from the call to fwnode_property_read_u16_array is int,
it can be a negative error code however this is being assigned to
an size_t variable 'nval', hence the check is always false.
Fix this by making 'nval' an int.
Detected by Coccinelle ("Unsigned expression compared with
zero: nval < 0")
Fixes: 96a6d031ca99 ("usb: typec: mux: Find the muxes by also matching against the device node")
Signed-off-by: YueHaibing <[email protected]>
Acked-by: Heikki Krogerus <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions