Skip to content

Commit 8c499e4

Browse files
guixinliu1995martinkpetersen
authored andcommitted
scsi: megaraid_sas: Fix double kfree()
When allocating log_to_span fails, kfree(instance->ctrl_context) is called twice. Remove redundant call. Link: https://lore.kernel.org/r/[email protected] Acked-by: Sumit Saxena <[email protected]> Signed-off-by: Guixin Liu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 6d17a11 commit 8c499e4

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/scsi/megaraid/megaraid_sas_fusion.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5310,7 +5310,6 @@ megasas_alloc_fusion_context(struct megasas_instance *instance)
53105310
if (!fusion->log_to_span) {
53115311
dev_err(&instance->pdev->dev, "Failed from %s %d\n",
53125312
__func__, __LINE__);
5313-
kfree(instance->ctrl_context);
53145313
return -ENOMEM;
53155314
}
53165315
}

0 commit comments

Comments
 (0)