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>
This commit is contained in:
Sudip Mukherjee
2016-03-11 22:09:09 -08:00
committed by Greg Kroah-Hartman
parent 8d0d4cc5a4
commit 757b816e40
+7 -7
View File
@@ -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;
}