net: ethernet: stmmac: Fix signedness bug in ipq806x_gmac_of_parse()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 25 Sep 2019 11:05:54 +0000 (14:05 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:51:16 +0000 (14:51 +0100)
commit13260106d33a5d23c731f240eb56b799102ab286
tree7c1ebf984b16af3e20b1bb271b50bd6798b42aee
parent42a9b766ab1ff36d0e168a5b9e29783394596948
net: ethernet: stmmac: Fix signedness bug in ipq806x_gmac_of_parse()

[ Upstream commit 231042181dc9d6122c6faba64e99ccb25f13cc6c ]

The "gmac->phy_mode" variable is an enum and in this context GCC will
treat it as an unsigned int so the error handling will never be
triggered.

Fixes: b1c17215d718 ("stmmac: add ipq806x glue layer")
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/stmicro/stmmac/dwmac-ipq806x.c