diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/host/fhci.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/usb/host/fhci.h b/drivers/usb/host/fhci.h index 649ab07308f..71c3caaea4c 100644 --- a/drivers/usb/host/fhci.h +++ b/drivers/usb/host/fhci.h | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/bug.h> | ||
23 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
24 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
25 | #include <linux/kfifo.h> | 26 | #include <linux/kfifo.h> |
@@ -515,9 +516,13 @@ static inline int cq_put(struct kfifo *kfifo, void *p) | |||
515 | 516 | ||
516 | static inline void *cq_get(struct kfifo *kfifo) | 517 | static inline void *cq_get(struct kfifo *kfifo) |
517 | { | 518 | { |
518 | void *p = NULL; | 519 | unsigned int sz; |
520 | void *p; | ||
521 | |||
522 | sz = kfifo_out(kfifo, (void *)&p, sizeof(p)); | ||
523 | if (sz != sizeof(p)) | ||
524 | return NULL; | ||
519 | 525 | ||
520 | kfifo_out(kfifo, (void *)&p, sizeof(p)); | ||
521 | return p; | 526 | return p; |
522 | } | 527 | } |
523 | 528 | ||