aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2009-11-10 03:53:58 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 14:55:22 -0500
commita33279dfd825846325546b4d42d542b214ccb8d9 (patch)
tree0002b1eb13523c1c39911954db05712460e790a7 /drivers/usb/host
parentfb34d53752d5bec5acc73422e462a9c68aeeaa2a (diff)
USB: r8a66597: clean up. remove unneeded null checks
td and dev can not be null. Also they are dereferenced in list_for_each_entry_safe and list_for_each before the check happens so we would have an oops if it were possible for them to be null. Found using the smatch static checker. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/r8a66597-hcd.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index e33d36256350..41dbc70ae752 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -822,8 +822,6 @@ static void force_dequeue(struct r8a66597 *r8a66597, u16 pipenum, u16 address)
822 return; 822 return;
823 823
824 list_for_each_entry_safe(td, next, list, queue) { 824 list_for_each_entry_safe(td, next, list, queue) {
825 if (!td)
826 continue;
827 if (td->address != address) 825 if (td->address != address)
828 continue; 826 continue;
829 827
@@ -2025,8 +2023,6 @@ static struct r8a66597_device *get_r8a66597_device(struct r8a66597 *r8a66597,
2025 struct list_head *list = &r8a66597->child_device; 2023 struct list_head *list = &r8a66597->child_device;
2026 2024
2027 list_for_each_entry(dev, list, device_list) { 2025 list_for_each_entry(dev, list, device_list) {
2028 if (!dev)
2029 continue;
2030 if (dev->usb_address != addr) 2026 if (dev->usb_address != addr)
2031 continue; 2027 continue;
2032 2028