aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJoe Perches2020-11-23 20:36:04 -0800
committerMartin K. Petersen2020-11-30 23:32:49 -0500
commit9aed578fba7839cab7a64a8184797e082ff759dd (patch)
tree3f7542e3609db49eb0f66400d23ab419e4dea007 /drivers
parent2ce6e200a04c246a9a60ab3ee05506ed4d778c08 (diff)
scsi: pm8001: Fix misindentation
kernel robot reported a misindentation of a goto. Fix it. At the same time, use a temporary for a repeated entry in the same block to reduce visual noise. Link: https://lore.kernel.org/r/9542a8be9954c1dca744f93f53bb1af6dd1436e8.1606192458.git.joe@perches.com Reported-by: kernel test robot <lkp@intel.com> Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/pm8001/pm8001_init.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/scsi/pm8001/pm8001_init.c b/drivers/scsi/pm8001/pm8001_init.c
index aaac12704475..9a5d284f076a 100644
--- a/drivers/scsi/pm8001/pm8001_init.c
+++ b/drivers/scsi/pm8001/pm8001_init.c
@@ -386,17 +386,17 @@ static int pm8001_alloc(struct pm8001_hba_info *pm8001_ha,
pm8001_ha->memoryMap.region[FORENSIC_MEM].element_size = 0x10000;
pm8001_ha->memoryMap.region[FORENSIC_MEM].alignment = 0x10000;
for (i = 0; i < pm8001_ha->max_memcnt; i++) {
+ struct mpi_mem *region = &pm8001_ha->memoryMap.region[i];
+
if (pm8001_mem_alloc(pm8001_ha->pdev,
- &pm8001_ha->memoryMap.region[i].virt_ptr,
- &pm8001_ha->memoryMap.region[i].phys_addr,
- &pm8001_ha->memoryMap.region[i].phys_addr_hi,
- &pm8001_ha->memoryMap.region[i].phys_addr_lo,
- pm8001_ha->memoryMap.region[i].total_len,
- pm8001_ha->memoryMap.region[i].alignment) != 0) {
- pm8001_dbg(pm8001_ha, FAIL,
- "Mem%d alloc failed\n",
- i);
- goto err_out;
+ &region->virt_ptr,
+ &region->phys_addr,
+ &region->phys_addr_hi,
+ &region->phys_addr_lo,
+ region->total_len,
+ region->alignment) != 0) {
+ pm8001_dbg(pm8001_ha, FAIL, "Mem%d alloc failed\n", i);
+ goto err_out;
}
}