All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix sym2_init
@ 2004-09-14 13:00 Christoph Hellwig
  0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2004-09-14 13:00 UTC (permalink / raw)
  To: willy; +Cc: linux-scsi

Use pci_module_init instead of pci_register_driver and handle
initialization failure.


--- 1.49/drivers/scsi/sym53c8xx_2/sym_glue.c	2004-09-13 14:36:39 +02:00
+++ edited/drivers/scsi/sym53c8xx_2/sym_glue.c	2004-09-14 16:33:41 +02:00
@@ -2443,12 +2383,16 @@
 
 static int __init sym2_init(void)
 {
+	int error;
+
 	sym2_transport_template = spi_attach_transport(&sym2_transport_functions);
 	if (!sym2_transport_template)
 		return -ENODEV;
 
-	pci_register_driver(&sym2_driver);
-	return 0;
+	error = pci_module_init(&sym2_driver);
+	if (error)
+		spi_release_transport(sym2_transport_template);
+	return error;
 }
 
 static void __exit sym2_exit(void)

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

only message in thread, other threads:[~2004-09-14 13:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-14 13:00 [PATCH] fix sym2_init Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.