diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-10-18 23:05:50 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-10-19 16:29:11 -0400 |
commit | a2c76b83fdd763c826f38a55127ccf25708099ce (patch) | |
tree | b5a9a59dd1b2e3aa7274a96ace5b44ea82d01679 /drivers/usb/renesas_usbhs/fifo.c | |
parent | 3a7655fcb210b349111251689d0a56b7250885ea (diff) |
usb: renesas_usbhs: fixup inconsistent return from usbhs_pkt_push()
usbhs_pkt_push() had inconsistent return under spin lock.
This patch fix it up.
Special thanks to Dan
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/renesas_usbhs/fifo.c')
-rw-r--r-- | drivers/usb/renesas_usbhs/fifo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c index 762b7429d8bb..8da685e796d1 100644 --- a/drivers/usb/renesas_usbhs/fifo.c +++ b/drivers/usb/renesas_usbhs/fifo.c | |||
@@ -62,14 +62,14 @@ void usbhs_pkt_push(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt, | |||
62 | struct device *dev = usbhs_priv_to_dev(priv); | 62 | struct device *dev = usbhs_priv_to_dev(priv); |
63 | unsigned long flags; | 63 | unsigned long flags; |
64 | 64 | ||
65 | /******************** spin lock ********************/ | ||
66 | usbhs_lock(priv, flags); | ||
67 | |||
68 | if (!done) { | 65 | if (!done) { |
69 | dev_err(dev, "no done function\n"); | 66 | dev_err(dev, "no done function\n"); |
70 | return; | 67 | return; |
71 | } | 68 | } |
72 | 69 | ||
70 | /******************** spin lock ********************/ | ||
71 | usbhs_lock(priv, flags); | ||
72 | |||
73 | if (!pipe->handler) { | 73 | if (!pipe->handler) { |
74 | dev_err(dev, "no handler function\n"); | 74 | dev_err(dev, "no handler function\n"); |
75 | pipe->handler = &usbhsf_null_handler; | 75 | pipe->handler = &usbhsf_null_handler; |