Merge branch '6.1/scsi-queue' into 6.1/scsi-fixes
[linux-block.git] / drivers / scsi / megaraid / megaraid_sas_base.c
index 465274ba9f1be8b33d53acaad0bad523524fe93f..d265a2d9d08245e2e65a4f62d7d0e810514ac87a 100644 (file)
@@ -3174,7 +3174,7 @@ megasas_bios_param(struct scsi_device *sdev, struct block_device *bdev,
        return 0;
 }
 
-static int megasas_map_queues(struct Scsi_Host *shost)
+static void megasas_map_queues(struct Scsi_Host *shost)
 {
        struct megasas_instance *instance;
        int qoff = 0, offset;
@@ -3183,7 +3183,7 @@ static int megasas_map_queues(struct Scsi_Host *shost)
        instance = (struct megasas_instance *)shost->hostdata;
 
        if (shost->nr_hw_queues == 1)
-               return 0;
+               return;
 
        offset = instance->low_latency_index_start;
 
@@ -3209,8 +3209,6 @@ static int megasas_map_queues(struct Scsi_Host *shost)
                map->queue_offset = qoff;
                blk_mq_map_queues(map);
        }
-
-       return 0;
 }
 
 static void megasas_aen_polling(struct work_struct *work);
@@ -7147,22 +7145,18 @@ static int megasas_alloc_ctrl_mem(struct megasas_instance *instance)
        switch (instance->adapter_type) {
        case MFI_SERIES:
                if (megasas_alloc_mfi_ctrl_mem(instance))
-                       goto fail;
+                       return -ENOMEM;
                break;
        case AERO_SERIES:
        case VENTURA_SERIES:
        case THUNDERBOLT_SERIES:
        case INVADER_SERIES:
                if (megasas_alloc_fusion_context(instance))
-                       goto fail;
+                       return -ENOMEM;
                break;
        }
 
        return 0;
- fail:
-       kfree(instance->reply_map);
-       instance->reply_map = NULL;
-       return -ENOMEM;
 }
 
 /*