Skip to contentSkip to conversation

ath_hif_usb: don't oops if fw not found

PATCH New Helmut Schaa 1 participant 1 message Feb 25, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath_hif_usb: don't oops if fw not found

ath_hif_usb oopses when the firmware file cannot be found. Fix this by reordering init_usb_anchor in hif_init_dev so that hif_dev->rx_submitted is actually initialized when usb_poison_anchored_urbs gets called as a result of the failed firmware request.

---

Luis, would you like the oops/backtrace in the commitmessage as well?

 ath/ath9k/ath_hif_usb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
ath/ath9k/ath_hif_usb.c +2 -2
index 481dc67..9ee74c0 100644
@@ -898,6 +898,8 @@ static int hif_init_dev(struct hif_device_usb *hif_dev, const char *fw_name)
 {
 	int r;
 
+	init_usb_anchor(&hif_dev->rx_submitted);
+
 	r = request_firmware(&hif_dev->firmware, fw_name, &hif_dev->udev->dev);
 	if (r) {
 		dev_err(&hif_dev->udev->dev, "ath_hif_usb: firmware "
@@ -905,8 +907,6 @@ static int hif_init_dev(struct hif_device_usb *hif_dev, const char *fw_name)
 		goto out;
 	}
 
-	init_usb_anchor(&hif_dev->rx_submitted);
-
 	if (ar9271_alloc_urbs(hif_dev))
 		goto fail_urbs;
 
Signature · 1 line
1.6.0.2