aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/htc.c
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>2011-10-03 07:58:25 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2011-11-11 05:50:54 -0500
commitb8d5d5ff0305f07061f672c91f63479433451af5 (patch)
treed23d0cadb8fef657e5b00c0ed096e71dd00e2ade /drivers/net/wireless/ath/ath6kl/htc.c
parent4159cc935a7ed119e5f824db06defaa34d992b56 (diff)
ath6kl: Fix htc_packet leak in ath6kl_htc_rx_fetch()
It is found during the code review. As the leak would happen only in failure case, the imapct is not easily visible. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/htc.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/htc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/htc.c b/drivers/net/wireless/ath/ath6kl/htc.c
index 7bc988438ead..4a03dacd9208 100644
--- a/drivers/net/wireless/ath/ath6kl/htc.c
+++ b/drivers/net/wireless/ath/ath6kl/htc.c
@@ -1715,12 +1715,10 @@ static int ath6kl_htc_rx_fetch(struct htc_target *target,
1715 packet = list_first_entry(rx_pktq, struct htc_packet, 1715 packet = list_first_entry(rx_pktq, struct htc_packet,
1716 list); 1716 list);
1717 1717
1718 list_del(&packet->list);
1719
1720 /* fully synchronous */ 1718 /* fully synchronous */
1721 packet->completion = NULL; 1719 packet->completion = NULL;
1722 1720
1723 if (!list_empty(rx_pktq)) 1721 if (!list_is_singular(rx_pktq))
1724 /* 1722 /*
1725 * look_aheads in all packet 1723 * look_aheads in all packet
1726 * except the last one in the 1724 * except the last one in the
@@ -1735,7 +1733,7 @@ static int ath6kl_htc_rx_fetch(struct htc_target *target,
1735 if (status) 1733 if (status)
1736 return status; 1734 return status;
1737 1735
1738 list_add_tail(&packet->list, comp_pktq); 1736 list_move_tail(&packet->list, comp_pktq);
1739 } 1737 }
1740 } 1738 }
1741 1739