aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/renesas_usbhs/mod_host.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-12-15 01:53:18 -0800
committerFelipe Balbi <balbi@ti.com>2011-12-15 12:59:17 +0200
commitd9b78f33d9c1b699b66f10ad2329487f813c4642 (patch)
treecfbd966e535a63e5965b8ced3d683d3e164ad47e /drivers/usb/renesas_usbhs/mod_host.c
parent15a3838b101b292c2e40824d843a4d8871ac4010 (diff)
usb: renesas_usbhs: tidyup for smatch warnings
This patch tidyup below smatch complaint drivers/usb/renesas_usbhs/mod_host.c +642 usbhsh_queue_done() warn: variable dereferenced before check 'urb' (see line 636) Special thanks to Dan Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/renesas_usbhs/mod_host.c')
-rw-r--r--drivers/usb/renesas_usbhs/mod_host.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/renesas_usbhs/mod_host.c b/drivers/usb/renesas_usbhs/mod_host.c
index aa50eaaffcb..df8363d252a 100644
--- a/drivers/usb/renesas_usbhs/mod_host.c
+++ b/drivers/usb/renesas_usbhs/mod_host.c
@@ -633,7 +633,6 @@ static void usbhsh_queue_done(struct usbhs_priv *priv, struct usbhs_pkt *pkt)
struct usbhsh_hpriv *hpriv = usbhsh_priv_to_hpriv(priv);
struct usb_hcd *hcd = usbhsh_hpriv_to_hcd(hpriv);
struct urb *urb = ureq->urb;
- struct usbhsh_ep *uep = usbhsh_ep_to_uep(urb->ep);
struct device *dev = usbhs_priv_to_dev(priv);
int status = 0;
@@ -651,7 +650,7 @@ static void usbhsh_queue_done(struct usbhs_priv *priv, struct usbhs_pkt *pkt)
usbhsh_ureq_free(hpriv, ureq);
usbhsh_endpoint_sequence_save(hpriv, urb, pkt);
- usbhsh_pipe_detach(hpriv, uep);
+ usbhsh_pipe_detach(hpriv, usbhsh_ep_to_uep(urb->ep));
usb_hcd_unlink_urb_from_ep(hcd, urb);
usb_hcd_giveback_urb(hcd, urb, status);