aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSujith Manoharan <Sujith.Manoharan@atheros.com>2011-02-20 21:20:38 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-02-23 16:25:28 -0500
commit512c044a299f133c8dc86dd5fa6378d745489286 (patch)
tree1b51b37995ba5c30551d139ffa2a76b6937bd939
parent3e3f1d197f5a432b961fadb35604dba92583945e (diff)
ath9k_htc: Fix error path in URB allocation
ath9k_hif_usb_alloc_urbs() takes care of freeing all the allocated URBs for the various endpoints when an error occurs. Calling ath9k_hif_usb_dealloc_urbs() would cause a panic since the URBs have already been freed. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/hif_usb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index fde54446973f..7dc20489f2e2 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -916,13 +916,11 @@ static int ath9k_hif_usb_dev_init(struct hif_device_usb *hif_dev, u32 drv_info)
916 if (ret) { 916 if (ret) {
917 dev_err(&hif_dev->udev->dev, 917 dev_err(&hif_dev->udev->dev,
918 "ath9k_htc: Unable to allocate URBs\n"); 918 "ath9k_htc: Unable to allocate URBs\n");
919 goto err_urb; 919 goto err_fw_download;
920 } 920 }
921 921
922 return 0; 922 return 0;
923 923
924err_urb:
925 ath9k_hif_usb_dealloc_urbs(hif_dev);
926err_fw_download: 924err_fw_download:
927 release_firmware(hif_dev->firmware); 925 release_firmware(hif_dev->firmware);
928err_fw_req: 926err_fw_req: