ChangeSet 1.1018.1.10, 2003/04/04 16:53:36-08:00, greg@kroah.com [PATCH] USB: remove redundant checks for NULL when it can never happen. drivers/usb/core/usb.c | 16 ---------------- 1 files changed, 16 deletions(-) diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c --- a/drivers/usb/core/usb.c Mon Apr 7 15:13:52 2003 +++ b/drivers/usb/core/usb.c Mon Apr 7 15:13:52 2003 @@ -110,12 +110,6 @@ intf = list_entry(dev,struct usb_interface,dev); driver = to_usb_driver(dev->driver); - if (!driver) { - dev_err(dev, "%s does not have a valid driver to work with!", - __FUNCTION__); - return -ENODEV; - } - down(&driver->serialize); if (intf->driver && intf->driver->disconnect) @@ -480,9 +474,6 @@ continue; intf = to_usb_interface(dev); - if (!intf) - continue; - if (kdev_same(intf->kdev,kdev)) { return intf; } @@ -548,12 +539,7 @@ return 0; intf = to_usb_interface(dev); - if (!intf) - return -ENODEV; - usb_dev = interface_to_usbdev (intf); - if (!usb_dev) - return -ENODEV; if (usb_dev->devnum < 0) { dbg ("device already deleted ??"); @@ -730,8 +716,6 @@ struct usb_device *udev; udev = to_usb_device(dev); - if (!udev) - return; if (udev->bus && udev->bus->op && udev->bus->op->deallocate) udev->bus->op->deallocate(udev);