net: socionext: Fix a signedness bug in ave_probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 25 Sep 2019 10:57:50 +0000 (13:57 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:51:15 +0000 (14:51 +0100)
commit9724794c961c89b177dfce860c5ad76c33457e97
tree472593af22b775f1dc2472e15db9e3190233bf7d
parentfb3809dde0acd7d492dd085490b4f5ee900c96ad
net: socionext: Fix a signedness bug in ave_probe()

[ Upstream commit 7f9e88e6ef8c971f2c638b5ff7044c59b5d0f58d ]

The "phy_mode" variable is an enum and in this context GCC treats it as
an unsigned int so the error handling is never triggered.

Fixes: 4c270b55a5af ("net: ethernet: socionext: add AVE ethernet driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/socionext/sni_ave.c