diff options
author | Christophe Jaillet <christophe.jaillet@wanadoo.fr> | 2016-07-17 03:03:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-19 14:30:26 -0400 |
commit | eab814661945656d35d4a0e5870e932cd7139977 (patch) | |
tree | ce123536138d57d9732e6741584f22124c0be9a6 /drivers/atm | |
parent | 731e6f007aa2d07fc1a420bffeb7c9e8226e89e6 (diff) |
drivers: atm: nicstar: Use the correct function to free some resources
In 'get_scq', 'dma_alloc_coherent' has been used to allocate some
resources, so we need to free them using 'dma_free_coherent' instead
of 'kfree'.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/atm')
-rw-r--r-- | drivers/atm/nicstar.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c index ddc4ceb85fc5..700ed15c2362 100644 --- a/drivers/atm/nicstar.c +++ b/drivers/atm/nicstar.c | |||
@@ -874,7 +874,8 @@ static scq_info *get_scq(ns_dev *card, int size, u32 scd) | |||
874 | scq->skb = kmalloc(sizeof(struct sk_buff *) * | 874 | scq->skb = kmalloc(sizeof(struct sk_buff *) * |
875 | (size / NS_SCQE_SIZE), GFP_KERNEL); | 875 | (size / NS_SCQE_SIZE), GFP_KERNEL); |
876 | if (!scq->skb) { | 876 | if (!scq->skb) { |
877 | kfree(scq->org); | 877 | dma_free_coherent(&card->pcidev->dev, |
878 | 2 * size, scq->org, scq->dma); | ||
878 | kfree(scq); | 879 | kfree(scq); |
879 | return NULL; | 880 | return NULL; |
880 | } | 881 | } |