| From c9876cd4e15326f2f2492322b56ae5ab35520266 Mon Sep 17 00:00:00 2001 |
| From: Sasha Levin <sashal@kernel.org> |
| Date: Fri, 1 Aug 2025 18:52:02 +0000 |
| Subject: scsi: lpfc: Remove redundant assignment to avoid memory leak |
| |
| From: Jiasheng Jiang <jiashengjiangcool@gmail.com> |
| |
| [ Upstream commit eea6cafb5890db488fce1c69d05464214616d800 ] |
| |
| Remove the redundant assignment if kzalloc() succeeds to avoid memory |
| leak. |
| |
| Fixes: bd2cdd5e400f ("scsi: lpfc: NVME Initiator: Add debugfs support") |
| Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com> |
| Link: https://lore.kernel.org/r/20250801185202.42631-1-jiashengjiangcool@gmail.com |
| Reviewed-by: Justin Tee <justin.tee@broadcom.com> |
| Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> |
| Signed-off-by: Sasha Levin <sashal@kernel.org> |
| --- |
| drivers/scsi/lpfc/lpfc_debugfs.c | 1 - |
| 1 file changed, 1 deletion(-) |
| |
| diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c |
| index 20662b4f339e..6b6c964e8076 100644 |
| --- a/drivers/scsi/lpfc/lpfc_debugfs.c |
| +++ b/drivers/scsi/lpfc/lpfc_debugfs.c |
| @@ -6291,7 +6291,6 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) |
| } |
| phba->nvmeio_trc_on = 1; |
| phba->nvmeio_trc_output_idx = 0; |
| - phba->nvmeio_trc = NULL; |
| } else { |
| nvmeio_off: |
| phba->nvmeio_trc_size = 0; |
| -- |
| 2.50.1 |
| |