]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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>
Wed, 29 Jan 2020 09:24:32 +0000 (10:24 +0100)
commit3f32f2547215d0749e2a28b0c71e15f11a850ecf
tree81a5221052aeda2e8463dcf307c6ebc7c842e125
parenta9e0dcfe6b194dc5fd5703da91e0fd383419f234
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