[PATCH] Char: sx, fix return in module init
authorJiri Slaby <jirislaby@gmail.com>
Fri, 8 Dec 2006 10:39:06 +0000 (02:39 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Fri, 8 Dec 2006 16:28:58 +0000 (08:28 -0800)
If pci_register_driver fails, but eisa_driver_register doesn't, we don't call
misc_deregister, but returns error.  Return OK in such cases.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/sx.c

index 0122b2d93312d058413f8ff39f1ff1f3eee8b437..f506ee3243d15cf2de435c4df25d223a4334b4bd 100644 (file)
@@ -2791,6 +2791,7 @@ static int __init sx_init(void)
                retval = 0;
        } else if (retval) {
 #ifdef CONFIG_EISA
+               retval = retval1;
                if (retval1)
 #endif
                        misc_deregister(&sx_fw_device);