linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Stephen Cameron <steve.cameron@hp.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] Fix cciss init error handling
Date: Sun, 2 Mar 2003 20:03:34 +1100	[thread overview]
Message-ID: <20030302090334.GA987@gondor.apana.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

The following patches against 2.4 and 2.5 makes cciss unregister properly
if initialisation fails.
-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[-- Attachment #2: 2.4 --]
[-- Type: text/plain, Size: 667 bytes --]

Index: drivers/block/cciss.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.4/drivers/block/cciss.c,v
retrieving revision 1.1.1.14
diff -u -r1.1.1.14 cciss.c
--- drivers/block/cciss.c	28 Nov 2002 23:53:12 -0000	1.1.1.14
+++ drivers/block/cciss.c	2 Mar 2003 08:53:02 -0000
@@ -2164,12 +2164,8 @@
 
 	printk(KERN_INFO DRIVER_NAME "\n");
 	/* Register for out PCI devices */
-	if (pci_register_driver(&cciss_pci_driver) > 0 )
-		return 0;
-	else 
-		return -ENODEV;
-
- }
+	return pci_module_init(&cciss_pci_driver);
+}
 
 EXPORT_NO_SYMBOLS;
 static int __init init_cciss_module(void)

[-- Attachment #3: 2.5 --]
[-- Type: text/plain, Size: 666 bytes --]

Index: drivers/block/cciss.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.5/drivers/block/cciss.c,v
retrieving revision 1.1.1.3
retrieving revision 1.2
diff -u -r1.1.1.3 -r1.2
--- drivers/block/cciss.c	24 Feb 2003 19:05:47 -0000	1.1.1.3
+++ drivers/block/cciss.c	2 Mar 2003 08:55:40 -0000	1.2
@@ -2435,11 +2435,7 @@
 	printk(KERN_INFO DRIVER_NAME "\n");
 
 	/* Register for out PCI devices */
-	if (pci_register_driver(&cciss_pci_driver) > 0 )
-		return 0;
-	else 
-		return -ENODEV;
-
+	return pci_module_init(&cciss_pci_driver);
 }
 
 static int __init init_cciss_module(void)

                 reply	other threads:[~2003-03-02  8:54 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=20030302090334.GA987@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=steve.cameron@hp.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).