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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:51:15 +0000 (14:51 +0100)
commitbb8179ad7662fd44ddb9c721dbf3007aaa05f16f
treef04cf3dab450842d82bee2034e76b09a7d5e76d4
parent39c421cb2721d7bb4af3291e4b209b11bd1db4d6
net: axienet: fix a signedness bug in probe

[ Upstream commit 73e211e11be86715d66bd3c9d38b3c34b05fca9a ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/xilinx/xilinx_axienet_main.c