net: axienet: fix a signedness bug in probe
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 25 Sep 2019 10:59:11 +0000 (13:59 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Sep 2019 08:17:22 +0000 (10:17 +0200)
commit73e211e11be86715d66bd3c9d38b3c34b05fca9a
tree2506e70922113c09c300c9e80e0f844058ccbc90
parentf10210517a2f37feea2edf85eb34c98977265c16
net: axienet: fix a signedness bug in probe

The "lp->phy_mode" is an enum but in this context GCC treats it as an
unsigned int so the error handling is never triggered.

Fixes: ee06b1728b95 ("net: axienet: add support for standard phy-mode binding")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/xilinx/xilinx_axienet_main.c