net: hisilicon: Fix signedness bug in hix5hd2_dev_probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 25 Sep 2019 10:55:32 +0000 (13:55 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:51:14 +0000 (14:51 +0100)
commitad0a596e189770640e389074ba0cadeb787298a4
tree057178f049d84ad2b3750df517791d303125ae96
parentaaf27e4fffef8f83ce721b9526c9671a2bdb7b8f
net: hisilicon: Fix signedness bug in hix5hd2_dev_probe()

[ Upstream commit 002dfe8085255b7bf1e0758c3d195c5412d35be9 ]

The "priv->phy_mode" variable is an enum and in this context GCC will
treat it as unsigned to the error handling will never trigger.

Fixes: 57c5bc9ad7d7 ("net: hisilicon: add hix5hd2 mac driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hix5hd2_gmac.c