diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2018-10-16 19:35:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-17 22:08:55 -0700 |
commit | e519869af368fe1da218b43bdb3a553d66f4fcd0 (patch) | |
tree | 5509b9ce22e3653022ab50d415a75d39a596238f /.clang-format | |
parent | 33c4368ee2589c165aebd8d388cbd91e9adb9688 (diff) | |
download | linux-e519869af368fe1da218b43bdb3a553d66f4fcd0.tar.bz2 |
net: phy: mscc: fix signedness bug in vsc85xx_downshift_get
Currently, the error handling for the call to function
phy_read_paged() doesn't work because *reg_val* is of
type u16 (16 bits, unsigned), which makes it impossible
for it to hold a value less than 0.
Fix this by changing the type of variable *reg_val* to int.
Addresses-Coverity-ID: 1473970 ("Unsigned compared against 0")
Fixes: 6a0bfbbe20b0 ("net: phy: mscc: migrate to phy_select/restore_page functions")
Reviewed-by: Quentin Schulz <quentin.schulz@bootlin.com>
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions