From linux-kernel-owner+willy=40w.ods.org@vger.kernel.org  Sun Mar  2 10:09:37 2003
Return-Path: <linux-kernel-owner+willy=40w.ods.org@vger.kernel.org>
Received: from vax.home.local (vax [10.2.1.2])
	by alpha.home.local (8.12.4/8.12.1) with ESMTP id h2299ali023472
	for <willy@w.ods.org>; Sun, 2 Mar 2003 10:09:36 +0100
Received: from vger.kernel.org (vger.kernel.org [209.116.70.75])
	by vax.home.local (8.12.2/8.12.1) with ESMTP id h2299X1P002048
	for <willy@w.ods.org>; Sun, 2 Mar 2003 10:09:34 +0100 (CET)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
	id <S269166AbTCBIyE>; Sun, 2 Mar 2003 03:54:04 -0500
Received: (majordomo@vger.kernel.org) by vger.kernel.org
	id <S269167AbTCBIyE>; Sun, 2 Mar 2003 03:54:04 -0500
Received: from arnor.apana.org.au ([203.14.152.115]:32525 "EHLO
	arnor.me.apana.org.au") by vger.kernel.org with ESMTP
	id <S269166AbTCBIyD>; Sun, 2 Mar 2003 03:54:03 -0500
Received: from gondolin.me.apana.org.au ([192.168.0.6] ident=mail)
	by arnor.me.apana.org.au with esmtp (Exim 3.35 #1 (Debian))
	id 18pPNk-00077g-00; Sun, 02 Mar 2003 20:03:40 +1100
Received: from herbert by gondolin.me.apana.org.au with local (Exim 3.36 #1 (Debian))
	id 18pPNf-0000GM-00; Sun, 02 Mar 2003 20:03:35 +1100
Date: 	Sun, 2 Mar 2003 20:03:34 +1100
To: Stephen Cameron <steve.cameron@hp.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] Fix cciss init error handling
Message-ID: <20030302090334.GA987@gondor.apana.org.au>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="oyUTqETQ0mS9luUI"
Content-Disposition: inline
User-Agent: Mutt/1.4i
From: Herbert Xu <herbert@gondor.apana.org.au>
Sender: linux-kernel-owner@vger.kernel.org
Precedence: bulk
X-Mailing-List: 	linux-kernel@vger.kernel.org
Status: RO
Content-Length: 2238
Lines: 72


--oyUTqETQ0mS9luUI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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

--oyUTqETQ0mS9luUI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="2.4"

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
--- linux/drivers/block/cciss.c	28 Nov 2002 23:53:12 -0000	1.1.1.14
+++ linux/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)

