提交 512c044a 编写于 作者: S Sujith Manoharan 提交者: John W. Linville

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: NSujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 3e3f1d19
...@@ -916,13 +916,11 @@ static int ath9k_hif_usb_dev_init(struct hif_device_usb *hif_dev, u32 drv_info) ...@@ -916,13 +916,11 @@ static int ath9k_hif_usb_dev_init(struct hif_device_usb *hif_dev, u32 drv_info)
if (ret) { if (ret) {
dev_err(&hif_dev->udev->dev, dev_err(&hif_dev->udev->dev,
"ath9k_htc: Unable to allocate URBs\n"); "ath9k_htc: Unable to allocate URBs\n");
goto err_urb; goto err_fw_download;
} }
return 0; return 0;
err_urb:
ath9k_hif_usb_dealloc_urbs(hif_dev);
err_fw_download: err_fw_download:
release_firmware(hif_dev->firmware); release_firmware(hif_dev->firmware);
err_fw_req: err_fw_req:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册