Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290408
b: refs/heads/master
c: 7f66c2f
h: refs/heads/master
v: v3
  • Loading branch information
Simon Graham authored and John W. Linville committed Feb 8, 2012
1 parent a7ad769 commit 74b4e9a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 79027596ff710f9662ccae5f5e85de43961420ed
refs/heads/master: 7f66c2f93e5779625c10d262c84537427a2673ca
16 changes: 10 additions & 6 deletions trunk/drivers/net/wireless/rtlwifi/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,10 +1148,12 @@ static void _rtl_pci_free_tx_ring(struct ieee80211_hw *hw,
ring->idx = (ring->idx + 1) % ring->entries;
}

pci_free_consistent(rtlpci->pdev,
sizeof(*ring->desc) * ring->entries,
ring->desc, ring->dma);
ring->desc = NULL;
if (ring->desc) {
pci_free_consistent(rtlpci->pdev,
sizeof(*ring->desc) * ring->entries,
ring->desc, ring->dma);
ring->desc = NULL;
}
}

static void _rtl_pci_free_rx_ring(struct rtl_pci *rtlpci)
Expand All @@ -1175,12 +1177,14 @@ static void _rtl_pci_free_rx_ring(struct rtl_pci *rtlpci)
kfree_skb(skb);
}

pci_free_consistent(rtlpci->pdev,
if (rtlpci->rx_ring[rx_queue_idx].desc) {
pci_free_consistent(rtlpci->pdev,
sizeof(*rtlpci->rx_ring[rx_queue_idx].
desc) * rtlpci->rxringcount,
rtlpci->rx_ring[rx_queue_idx].desc,
rtlpci->rx_ring[rx_queue_idx].dma);
rtlpci->rx_ring[rx_queue_idx].desc = NULL;
rtlpci->rx_ring[rx_queue_idx].desc = NULL;
}
}
}

Expand Down

0 comments on commit 74b4e9a

Please sign in to comment.