projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
731e6f0
)
drivers: atm: nicstar: Use the correct function to free some resources
author
Christophe Jaillet
<christophe.jaillet@wanadoo.fr>
Sun, 17 Jul 2016 07:03:24 +0000
(09:03 +0200)
committer
David S. Miller
<davem@davemloft.net>
Tue, 19 Jul 2016 18:30:26 +0000
(11:30 -0700)
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>
drivers/atm/nicstar.c
patch
|
blob
|
history
diff --git
a/drivers/atm/nicstar.c
b/drivers/atm/nicstar.c
index
ddc4ceb
..
700ed15
100644
(file)
--- 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)
scq->skb = kmalloc(sizeof(struct sk_buff *) *
(size / NS_SCQE_SIZE), GFP_KERNEL);
if (!scq->skb) {
- kfree(scq->org);
+ dma_free_coherent(&card->pcidev->dev,
+ 2 * size, scq->org, scq->dma);
kfree(scq);
return NULL;
}