All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: willy@debian.org
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH] fix sym2_init
Date: Tue, 14 Sep 2004 15:00:49 +0200	[thread overview]
Message-ID: <20040914130049.GA11300@lst.de> (raw)

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)

                 reply	other threads:[~2004-09-14 13:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040914130049.GA11300@lst.de \
    --to=hch@lst.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=willy@debian.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.