From: weiping Date: Tue, 8 Aug 2017 05:15:55 +0000 (+0800) Subject: scsi: megaraid_sas: fix allocate instance->pd_info twice X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3b8328e2e0fda49202b502154608dd6fb8e8ed37;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git scsi: megaraid_sas: fix allocate instance->pd_info twice fix allocate instance->pd_info twice which was introduced by 96188a89cc6d. Signed-off-by: weiping zhang Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c index 03693c438b67..5202c2fd72ac 100644 --- a/drivers/scsi/megaraid/megaraid_sas_base.c +++ b/drivers/scsi/megaraid/megaraid_sas_base.c @@ -6097,14 +6097,12 @@ static int megasas_probe_one(struct pci_dev *pdev, instance->pd_info = pci_alloc_consistent(pdev, sizeof(struct MR_PD_INFO), &instance->pd_info_h); - instance->pd_info = pci_alloc_consistent(pdev, - sizeof(struct MR_PD_INFO), &instance->pd_info_h); - instance->tgt_prop = pci_alloc_consistent(pdev, - sizeof(struct MR_TARGET_PROPERTIES), &instance->tgt_prop_h); - if (!instance->pd_info) dev_err(&instance->pdev->dev, "Failed to alloc mem for pd_info\n"); + instance->tgt_prop = pci_alloc_consistent(pdev, + sizeof(struct MR_TARGET_PROPERTIES), &instance->tgt_prop_h); + if (!instance->tgt_prop) dev_err(&instance->pdev->dev, "Failed to alloc mem for tgt_prop\n");