diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2016-02-27 12:03:32 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-12 06:09:09 (GMT) |
commit | 757b816e40235e03e1d90c7ec06dad7a684282f3 (patch) | |
tree | 4ed068388918351326d055640a5a607716f51423 /drivers/staging/dgnc | |
parent | 8d0d4cc5a46933fbce0f75fb085fefc8b45f23aa (diff) | |
download | linux-757b816e40235e03e1d90c7ec06dad7a684282f3.tar.xz |
staging: dgnc: remove unneeded else
If pci_enable_device() fails then we can return directly.
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgnc')
-rw-r--r-- | drivers/staging/dgnc/dgnc_driver.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index fc6d298..c32f208 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -283,13 +283,13 @@ static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) /* wake up and enable device */ rc = pci_enable_device(pdev); - if (rc < 0) { - rc = -EIO; - } else { - rc = dgnc_found_board(pdev, ent->driver_data); - if (rc == 0) - dgnc_NumBoards++; - } + if (rc) + return -EIO; + + rc = dgnc_found_board(pdev, ent->driver_data); + if (rc == 0) + dgnc_NumBoards++; + return rc; } |