mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
net: hisilicon: Fix signedness bug in hix5hd2_dev_probe()
[ Upstream commit002dfe8085] 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:57c5bc9ad7("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>
This commit is contained in:
@@ -929,7 +929,7 @@ static int hix5hd2_dev_probe(struct platform_device *pdev)
|
||||
goto err_free_mdio;
|
||||
|
||||
priv->phy_mode = of_get_phy_mode(node);
|
||||
if (priv->phy_mode < 0) {
|
||||
if ((int)priv->phy_mode < 0) {
|
||||
netdev_err(ndev, "not find phy-mode\n");
|
||||
ret = -EINVAL;
|
||||
goto err_mdiobus;
|
||||
|
||||
Reference in New Issue
Block a user