Commit 4bf49ce4 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: clean up usb_get_dev() as it was written quite horribly.

parent 3ccbb87c
......@@ -770,16 +770,9 @@ usb_alloc_dev(struct usb_device *parent, struct usb_bus *bus, unsigned port)
*/
struct usb_device *usb_get_dev (struct usb_device *dev)
{
struct device *tmp;
if (!dev)
return NULL;
tmp = get_device(&dev->dev);
if (tmp)
return to_usb_device(tmp);
else
return NULL;
if (dev)
get_device(&dev->dev);
return dev;
}
/**
......
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