diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-10-17 21:04:37 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-10-18 16:51:34 -0400 |
commit | 55b5a624a0cc5aa4b350fd50d78cf3415f795bfe (patch) | |
tree | 50c5519b09c4903a6a2c1f47cf1faa53e91ffc27 /drivers/usb/renesas_usbhs | |
parent | 3a6e7119a7779866b432a3abf443243b52eaad3d (diff) |
usb: renesas_usbhs: tidyup for smatch warnings
This patch tidyup below smatch complaint
drivers/usb/renesas_usbhs/mod_host.c +447 usbhsh_endpoint_free()
warn: variable dereferenced before check 'uep' (see line 444)
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: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/renesas_usbhs')
-rw-r--r-- | drivers/usb/renesas_usbhs/mod_host.c | 3 |
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 1c603310f9f8..1a7208a50afc 100644 --- a/drivers/usb/renesas_usbhs/mod_host.c +++ b/drivers/usb/renesas_usbhs/mod_host.c | |||
@@ -441,14 +441,13 @@ void usbhsh_endpoint_free(struct usbhsh_hpriv *hpriv, | |||
441 | struct usbhs_priv *priv = usbhsh_hpriv_to_priv(hpriv); | 441 | struct usbhs_priv *priv = usbhsh_hpriv_to_priv(hpriv); |
442 | struct device *dev = usbhs_priv_to_dev(priv); | 442 | struct device *dev = usbhs_priv_to_dev(priv); |
443 | struct usbhsh_ep *uep = usbhsh_ep_to_uep(ep); | 443 | struct usbhsh_ep *uep = usbhsh_ep_to_uep(ep); |
444 | struct usbhsh_device *udev = usbhsh_uep_to_udev(uep); | ||
445 | struct usbhsh_pipe_info *info; | 444 | struct usbhsh_pipe_info *info; |
446 | 445 | ||
447 | if (!uep) | 446 | if (!uep) |
448 | return; | 447 | return; |
449 | 448 | ||
450 | dev_dbg(dev, "%s [%d-%s](%p)\n", __func__, | 449 | dev_dbg(dev, "%s [%d-%s](%p)\n", __func__, |
451 | usbhsh_device_number(hpriv, udev), | 450 | usbhsh_device_number(hpriv, usbhsh_uep_to_udev(uep)), |
452 | usbhs_pipe_name(uep->pipe), uep); | 451 | usbhs_pipe_name(uep->pipe), uep); |
453 | 452 | ||
454 | info = usbhsh_pipe_info(uep->pipe); | 453 | info = usbhsh_pipe_info(uep->pipe); |