mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scsi: lpfc: Remove redundant assignment to avoid memory leak
@ 2025-08-01 18:52 Jiasheng Jiang
  2025-08-01 22:33 ` Justin Tee
  2025-08-06  2:06 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Jiasheng Jiang @ 2025-08-01 18:52 UTC (permalink / raw)
  To: James Smart, Dick Kennedy
  Cc: James E . J . Bottomley, Martin K . Petersen, Hannes Reinecke,
	linux-scsi, linux-kernel, Jiasheng Jiang

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>
---
 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 2db8d9529b8f..7c4d7bb3a56f 100644
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
@@ -6280,7 +6280,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.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-06  2:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-01 18:52 [PATCH] scsi: lpfc: Remove redundant assignment to avoid memory leak Jiasheng Jiang
2025-08-01 22:33 ` Justin Tee
2025-08-06  2:06 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®