From patchwork Tue Apr 6 10:00:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sujith X-Patchwork-Id: 90766 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o369eIYM026419 for ; Tue, 6 Apr 2010 09:40:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752482Ab0DFJkR (ORCPT ); Tue, 6 Apr 2010 05:40:17 -0400 Received: from mail.atheros.com ([12.36.123.2]:22603 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751228Ab0DFJkQ (ORCPT ); Tue, 6 Apr 2010 05:40:16 -0400 Received: from mail.atheros.com ([10.10.20.105]) by sidewinder.atheros.com for ; Tue, 06 Apr 2010 02:40:16 -0700 Received: from CHEXHC-01.global.atheros.com (10.12.0.100) by SC1EXHC-01.global.atheros.com (10.10.20.105) with Microsoft SMTP Server (TLS) id 8.2.213.0; Tue, 6 Apr 2010 02:38:27 -0700 Received: from kamboji (10.12.0.31) by CHEXHC-01.global.atheros.com (10.12.0.100) with Microsoft SMTP Server (TLS) id 8.2.176.0; Tue, 6 Apr 2010 15:08:23 +0530 From: Sujith MIME-Version: 1.0 Message-ID: <19387.1613.288681.446110@gargle.gargle.HOWL> Date: Tue, 6 Apr 2010 15:30:45 +0530 To: CC: Subject: [PATCH 2/5] ath9k_htc: Fix RX URB reference count X-Mailer: VM 8.0.12 under 23.1.1 (x86_64-unknown-linux-gnu) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 06 Apr 2010 09:40:19 +0000 (UTC) diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 8838cdf..4528df4 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c @@ -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;