Commit 6d316d71 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] PCI: clean up pci_dev_get() to be sane

Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 399bbfef
......@@ -504,16 +504,9 @@ static int pci_bus_match(struct device * dev, struct device_driver * drv)
*/
struct pci_dev *pci_dev_get(struct pci_dev *dev)
{
struct device *tmp;
if (!dev)
return NULL;
tmp = get_device(&dev->dev);
if (tmp)
return to_pci_dev(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