From 83a7bdeda32d51121a257bc1ac1d770b4d8f150c Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Wed, 8 Oct 2003 20:30:40 -0700 Subject: [PATCH] [PATCH] USB: remove stupid check for NULL in devio.c usually this would be too trivial, but is so obviously stupid that people might think that there's some hidden trick in there. We should not check for NULL _after_ following a pointer. Consider it a small tiny step towards cleaning up this code. --- drivers/usb/core/devio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index ba02431328a9f..ecef33242859b 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -384,7 +384,7 @@ static int releaseintf(struct dev_state *ps, unsigned int intf) err = -EINVAL; dev = ps->dev; down(&dev->serialize); - if (dev && test_and_clear_bit(intf, &ps->ifclaimed)) { + if (test_and_clear_bit(intf, &ps->ifclaimed)) { iface = dev->actconfig->interface[intf]; usb_driver_release_interface(&usbdevfs_driver, iface); err = 0; -- 2.53.0