From: Helmut Schaa <helmut.schaa@googlemail.com>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: devel@linuxdriverproject.org, linux-wireless@vger.kernel.org
Subject: [PATCH] ath_hif_usb: don't oops if fw not found
Date: Thu, 25 Feb 2010 12:03:33 +0100 [thread overview]
Message-ID: <201002251203.33410.helmut.schaa@googlemail.com> (raw)
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.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
---
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(-)
diff --git a/ath/ath9k/ath_hif_usb.c b/ath/ath9k/ath_hif_usb.c
index 481dc67..9ee74c0 100644
--- a/ath/ath9k/ath_hif_usb.c
+++ b/ath/ath9k/ath_hif_usb.c
@@ -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;
--
1.6.0.2
reply other threads:[~2010-02-25 11:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201002251203.33410.helmut.schaa@googlemail.com \
--to=helmut.schaa@googlemail.com \
--cc=devel@linuxdriverproject.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).