YueHaibing 4e46f271c3 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 <yuehaibing@huawei.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19 14:26:45 +01:00
..
2019-01-28 08:44:58 +01:00
2019-02-15 09:08:57 +01:00
2019-02-15 09:08:57 +01:00
2019-02-15 09:08:57 +01:00
2019-02-15 09:08:57 +01:00
2019-02-15 09:08:57 +01:00
2019-01-28 08:44:58 +01:00