Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199450
b: refs/heads/master
c: 5001960
h: refs/heads/master
v: v3
  • Loading branch information
Christian Lamparter authored and John W. Linville committed May 26, 2010
1 parent 1b2b4fa commit fba2560
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b578bb490fb605c23c20b63995f26d3ab2cfb6e0
refs/heads/master: 5001960016bb53a1075bd9d62d7c067cd38c5a68
14 changes: 12 additions & 2 deletions trunk/drivers/net/wireless/ath/ar9170/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,17 +739,27 @@ static int ar9170_usb_init_device(struct ar9170_usb *aru)
static void ar9170_usb_firmware_failed(struct ar9170_usb *aru)
{
struct device *parent = aru->udev->dev.parent;
struct usb_device *udev;

/*
* Store a copy of the usb_device pointer locally.
* This is because device_release_driver initiates
* ar9170_usb_disconnect, which in turn frees our
* driver context (aru).
*/
udev = aru->udev;

complete(&aru->firmware_loading_complete);

/* unbind anything failed */
if (parent)
device_lock(parent);
device_release_driver(&aru->udev->dev);

device_release_driver(&udev->dev);
if (parent)
device_unlock(parent);

usb_put_dev(aru->udev);
usb_put_dev(udev);
}

static void ar9170_usb_firmware_finish(const struct firmware *fw, void *context)
Expand Down

0 comments on commit fba2560

Please sign in to comment.