]> git.baikalelectronics.ru Git - kernel.git/commit
netdevsim: Fix unsigned being compared to less than zero
authorColin Ian King <colin.king@canonical.com>
Thu, 3 Jun 2021 21:56:57 +0000 (22:56 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Jun 2021 22:33:17 +0000 (15:33 -0700)
commit1e2c6fd8bcf14c5a3534e3b344999d313cede80c
tree91da4856ac82faedcf9bb25ed004ffd291d05a87
parent5d83b5565c73e87f3b9328b9235eb0a9ee786776
netdevsim: Fix unsigned being compared to less than zero

The comparison of len < 0 is always false because len is a size_t. Fix
this by making len a ssize_t instead.

Addresses-Coverity: ("Unsigned compared against 0")
Fixes: c6069c1e42f1 ("netdevsim: Add max_vfs to bus_dev")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netdevsim/bus.c