From: Sujith Manoharan Date: Mon, 21 Feb 2011 02:20:38 +0000 (+0530) Subject: ath9k_htc: Fix error path in URB allocation X-Git-Tag: v2.6.39-rc1~468^2~25^2^2~113 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=512c044a299f133c8dc86dd5fa6378d745489286;p=platform%2Fkernel%2Flinux-stable.git 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 Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index fde5444..7dc2048 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) if (ret) { dev_err(&hif_dev->udev->dev, "ath9k_htc: Unable to allocate URBs\n"); - goto err_urb; + goto err_fw_download; } return 0; -err_urb: - ath9k_hif_usb_dealloc_urbs(hif_dev); err_fw_download: release_firmware(hif_dev->firmware); err_fw_req: