Merge branch '5.20/scsi-queue' into 6.0/scsi-fixes
[linux-2.6-block.git] / drivers / scsi / megaraid / megaraid_sas_base.c
index a3e117a4b8e746981daa7315b716e6e0dc2c8a4e..f6c37a97544ea838ef8274f903f2feba83162f50 100644 (file)
@@ -7153,22 +7153,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;
 }
 
 /*