Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 682a73cd authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Greg Kroah-Hartman
Browse files

ath10k: Fix an error handling path



[ Upstream commit ed3573bc3943c27d2d8e405a242f87ed14572ca1 ]

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

Fixes: 4db66499 ("ath10k: add initial USB support")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201122170342.1346011-1-christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8e36d0ca
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1019,6 +1019,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;