Commit 83a7bded authored by Oliver Neukum's avatar Oliver Neukum Committed by Benjamin Herrenschmidt

[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.
parent d5b16693
...@@ -384,7 +384,7 @@ static int releaseintf(struct dev_state *ps, unsigned int intf) ...@@ -384,7 +384,7 @@ static int releaseintf(struct dev_state *ps, unsigned int intf)
err = -EINVAL; err = -EINVAL;
dev = ps->dev; dev = ps->dev;
down(&dev->serialize); 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]; iface = dev->actconfig->interface[intf];
usb_driver_release_interface(&usbdevfs_driver, iface); usb_driver_release_interface(&usbdevfs_driver, iface);
err = 0; err = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment