Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 66b10e33 authored by Sujith's avatar Sujith Committed by John W. Linville
Browse files

ath9k_htc: Fix RX URB reference count



RX URBs are automatically freed when the reference
count drops to zero - this currently doesn't happen when
usb_kill_anchored_urbs() is called during unload.

Fix this by dropping the reference count by one during
initial submission.

Signed-off-by: default avatarSujith <Sujith.Manoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 46baa1a2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -652,6 +652,12 @@ static int ath9k_hif_usb_alloc_rx_urbs(struct hif_device_usb *hif_dev)
			usb_unanchor_urb(urb);
			goto err_submit;
		}

		/*
		 * Drop reference count.
		 * This ensures that the URB is freed when killing them.
		 */
		usb_free_urb(urb);
	}

	return 0;