* [PATCH] scsi: lpfc: remove unnnecessary NULL check
@ 2026-08-13 7:09 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2026-08-13 7:09 UTC (permalink / raw)
To: Justin Tee
Cc: Paul Ely, James E.J. Bottomley, Martin K. Petersen, linux-scsi,
linux-kernel, kernel-janitors
The "evt_dat" variale is non-NULL at this point so there is no need to
check. Delete the check and pull the code in a tab.
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
drivers/scsi/lpfc/lpfc_bsg.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c
index c95165905483..7354ae9ba8e5 100644
--- a/drivers/scsi/lpfc/lpfc_bsg.c
+++ b/drivers/scsi/lpfc/lpfc_bsg.c
@@ -1329,10 +1329,8 @@ lpfc_bsg_hba_get_event(struct bsg_job *job)
else
bsg_reply->reply_payload_rcv_len = 0;
- if (evt_dat) {
- kfree(evt_dat->data);
- kfree(evt_dat);
- }
+ kfree(evt_dat->data);
+ kfree(evt_dat);
spin_lock_irqsave(&phba->ct_ev_lock, flags);
lpfc_bsg_event_unref(evt);
--
2.53.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-13 7:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-13 7:09 [PATCH] scsi: lpfc: remove unnnecessary NULL check Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox