summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiang Chen <chenxiang66@hisilicon.com>2019-09-07 03:07:30 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2019-09-24 05:09:42 +0200
commit70054aa39a013fa52eff432f2223b8bd5c0048f8 (patch)
tree5ea606a8b5043ed89d6112962ddb1eb74596e100
parentscsi: storvsc: setup 1:1 mapping between hardware queue and CPU queue (diff)
downloadlinux-70054aa39a013fa52eff432f2223b8bd5c0048f8.tar.xz
linux-70054aa39a013fa52eff432f2223b8bd5c0048f8.zip
scsi: megaraid: disable device when probe failed after enabled device
For pci device, need to disable device when probe failed after enabled device. Link: https://lore.kernel.org/r/1567818450-173315-1-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com> Reviewed-by: John Garry <john.garry@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/megaraid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 45a66048801b..ff6d4aa92421 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -4183,11 +4183,11 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
*/
if (pdev->subsystem_vendor == PCI_VENDOR_ID_COMPAQ &&
pdev->subsystem_device == 0xC000)
- return -ENODEV;
+ goto out_disable_device;
/* Now check the magic signature byte */
pci_read_config_word(pdev, PCI_CONF_AMISIG, &magic);
if (magic != HBA_SIGNATURE_471 && magic != HBA_SIGNATURE)
- return -ENODEV;
+ goto out_disable_device;
/* Ok it is probably a megaraid */
}