Commit 757b816e authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Greg Kroah-Hartman

staging: dgnc: remove unneeded else

If pci_enable_device() fails then we can return directly.
Signed-off-by: default avatarSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8d0d4cc5
...@@ -283,13 +283,13 @@ static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -283,13 +283,13 @@ static int dgnc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
/* wake up and enable device */ /* wake up and enable device */
rc = pci_enable_device(pdev); rc = pci_enable_device(pdev);
if (rc < 0) { if (rc)
rc = -EIO; return -EIO;
} else {
rc = dgnc_found_board(pdev, ent->driver_data); rc = dgnc_found_board(pdev, ent->driver_data);
if (rc == 0) if (rc == 0)
dgnc_NumBoards++; dgnc_NumBoards++;
}
return rc; return rc;
} }
......
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