mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scsi: message: fusion: Use more common error handling code in mpt_attach()
@ 2026-06-17 18:34 Markus Elfring
  0 siblings, 0 replies; only message in thread
From: Markus Elfring @ 2026-06-17 18:34 UTC (permalink / raw)
  To: linux-scsi, MPT-FusionLinux.pdl, Ewan D. Milne,
	Johannes Thumshirn, Martin K. Petersen, Sathya Prakash,
	Sreekanth Reddy, Suganath Prabu Subramani, Ranjan Kumar,
	Tomas Henzl
  Cc: LKML, kernel-janitors, Insu Yun

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 17 Jun 2026 20:22:26 +0200

Use an existing label once more so that a bit of exception handling can be
better reused at the end of this function implementation.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/message/fusion/mptbase.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 3a431ffd3e2e..c2c5a25cf5ae 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -2014,9 +2014,7 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
 
 		destroy_workqueue(ioc->reset_work_q);
 		ioc->reset_work_q = NULL;
-
-		kfree(ioc);
-		return r;
+		goto out_free_ioc;
 	}
 
 	/* call per device driver probe entry point */
-- 
2.54.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-17 18:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-17 18:34 [PATCH] scsi: message: fusion: Use more common error handling code in mpt_attach() Markus Elfring

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®