summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2010-02-04 10:34:41 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2010-02-04 10:34:41 +1100
commit2bc62bed0546e4e0e22c479ffa8bb3c264350101 (patch)
treea6c3b6fa29d27170804de59941ccc92cbed99539 /kernel
parent77be1a3b628167946a0b2331c51d38ae974f1cdc (diff)
parentf2b433b4cd33045fb73ad4602bee69c718ec15ae (diff)
Merge branch 'quilt/usb.current'
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kfifo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/kfifo.c b/kernel/kfifo.c
index 498cabba225e..35edbe22e9a9 100644
--- a/kernel/kfifo.c
+++ b/kernel/kfifo.c
@@ -80,7 +80,7 @@ int kfifo_alloc(struct kfifo *fifo, unsigned int size, gfp_t gfp_mask)
buffer = kmalloc(size, gfp_mask);
if (!buffer) {
- _kfifo_init(fifo, 0, 0);
+ _kfifo_init(fifo, NULL, 0);
return -ENOMEM;
}
@@ -97,6 +97,7 @@ EXPORT_SYMBOL(kfifo_alloc);
void kfifo_free(struct kfifo *fifo)
{
kfree(fifo->buffer);
+ _kfifo_init(fifo, NULL, 0);
}
EXPORT_SYMBOL(kfifo_free);