Skip to content

Commit

Permalink
ath10k: Fix an error handling path
Browse files Browse the repository at this point in the history
If 'ath10k_usb_create()' fails, we should release some resources and report
an error instead of silently continuing.

Fixes: 4db6649 ("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
  • Loading branch information
Christophe JAILLET authored and Kalle Valo committed Dec 2, 2020
1 parent c7cee9c commit ed3573b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wireless/ath/ath10k/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,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;
Expand Down

0 comments on commit ed3573b

Please sign in to comment.