Commit 3b7f1016 authored by Tobias Klauser's avatar Tobias Klauser Committed by Bjorn Helgaas

PCI: Remove unnecessary variable in pci_add_dynid()

The variable "retval" in pci_add_dynid() is only used to store the return
value of driver_attach() and is then directly returned.  Remove the
variable and directly pass on driver_attach()'s return value.
Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 52addcf9
......@@ -55,7 +55,6 @@ int pci_add_dynid(struct pci_driver *drv,
unsigned long driver_data)
{
struct pci_dynid *dynid;
int retval;
dynid = kzalloc(sizeof(*dynid), GFP_KERNEL);
if (!dynid)
......@@ -73,9 +72,7 @@ int pci_add_dynid(struct pci_driver *drv,
list_add_tail(&dynid->node, &drv->dynids.list);
spin_unlock(&drv->dynids.lock);
retval = driver_attach(&drv->driver);
return retval;
return driver_attach(&drv->driver);
}
EXPORT_SYMBOL_GPL(pci_add_dynid);
......
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