diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2014-07-25 10:36:14 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-09-03 20:42:33 +0200 |
commit | 3b7f1016628e04f937bafd468ce6fa437b92e275 (patch) | |
tree | 45cfb89bd40723a61ec93f59a73d2858b2fd2144 /drivers/pci | |
parent | Linux 3.17-rc2 (diff) | |
download | linux-3b7f1016628e04f937bafd468ce6fa437b92e275.tar.xz linux-3b7f1016628e04f937bafd468ce6fa437b92e275.zip |
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: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci-driver.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index d04c5adafc16..2b3c89425bb5 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -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); |