net: tehuti: fix error return code in bdx_probe()
authorJia-Ju Bai <baijiaju1990@gmail.com>
Fri, 5 Mar 2021 02:06:48 +0000 (18:06 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Mar 2021 12:31:48 +0000 (14:31 +0200)
commit5f86016bdfa7770dbddf633223a63284ce5259e5
tree3db86edd57c936f2265f67e1b20b8d79f4d73941
parent71b996c9b883313be4320954c902e84031399fd9
net: tehuti: fix error return code in bdx_probe()

[ Upstream commit 38c26ff3048af50eee3fcd591921357ee5bfd9ee ]

When bdx_read_mac() fails, no error return code of bdx_probe()
is assigned.
To fix this bug, err is assigned with -EFAULT as error return code.

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/tehuti/tehuti.c