Commit a2c76b83 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Greg Kroah-Hartman

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: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3a7655fc
...@@ -62,14 +62,14 @@ void usbhs_pkt_push(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt, ...@@ -62,14 +62,14 @@ void usbhs_pkt_push(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt,
struct device *dev = usbhs_priv_to_dev(priv); struct device *dev = usbhs_priv_to_dev(priv);
unsigned long flags; unsigned long flags;
/******************** spin lock ********************/
usbhs_lock(priv, flags);
if (!done) { if (!done) {
dev_err(dev, "no done function\n"); dev_err(dev, "no done function\n");
return; return;
} }
/******************** spin lock ********************/
usbhs_lock(priv, flags);
if (!pipe->handler) { if (!pipe->handler) {
dev_err(dev, "no handler function\n"); dev_err(dev, "no handler function\n");
pipe->handler = &usbhsf_null_handler; pipe->handler = &usbhsf_null_handler;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment