1
0
Fork 0

ath10k: Fix an error handling path

[ Upstream commit ed3573bc39 ]

If 'ath10k_usb_create()' fails, we should release some resources and report
an error instead of silently continuing.

Fixes: 4db66499df ("ath10k: add initial USB support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201122170342.1346011-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
5.4-rM2-2.2.x-imx-squashed
Christophe JAILLET 2020-11-24 17:59:18 +02:00 committed by Greg Kroah-Hartman
parent e856abba7f
commit 6b6edd2c07
1 changed files with 2 additions and 0 deletions

View File

@ -1009,6 +1009,8 @@ static int ath10k_usb_probe(struct usb_interface *interface,
ar_usb = ath10k_usb_priv(ar);
ret = ath10k_usb_create(ar, interface);
if (ret)
goto err;
ar_usb->ar = ar;
ar->dev_id = product_id;