net: lan78xx: Bail out if lan78xx_get_endpoints fails
authorStefan Wahren <stefan.wahren@i2se.com>
Tue, 4 Sep 2018 17:29:09 +0000 (19:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Nov 2019 17:45:58 +0000 (18:45 +0100)
commit4b702fdd6e7e6d7a7e6359857a2c49ffbc891a29
tree45dfbc16799bc7b1add8c408aff47d01e7303589
parent23ad83c399b0ac62b6e8cd10352119f3b4116c0b
net: lan78xx: Bail out if lan78xx_get_endpoints fails

[ Upstream commit fa8cd98c06407b5798b927cd7fd14d30f360ed02 ]

We need to bail out if lan78xx_get_endpoints() fails, otherwise the
result is overwritten.

Fixes: 55d7de9de6c3 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet")
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Raghuram Chary Jallipalli <raghuramchary.jallipalli@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/usb/lan78xx.c