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. regards, dan carpenter Signed-off-by: Dan Carpenter <error27@xxxxxxxxx> --- orig/drivers/usb/host/r8a66597-hcd.c 2009-11-08 20:28:04.000000000 +0200 +++ devel/drivers/usb/host/r8a66597-hcd.c 2009-11-08 20:31:32.000000000 +0200 @@ -822,8 +822,6 @@ return; list_for_each_entry_safe(td, next, list, queue) { - if (!td) - continue; if (td->address != address) continue; @@ -2025,8 +2023,6 @@ struct list_head *list = &r8a66597->child_device; list_for_each_entry(dev, list, device_list) { - if (!dev) - continue; if (dev->usb_address != addr) continue; -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html