]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Platform: Fix error path in samsung-laptop init
authorDavid Herrmann <dh.herrmann@googlemail.com>
Tue, 20 Sep 2011 16:16:12 +0000 (09:16 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:42:54 +0000 (09:42 -0800)
commit a7ea19926ffba86f373f6050a106cd162dbb9a78 upstream.

samsung_init() should not return success if not all devices are initialized.
Otherwise, samsung_exit() will dereference sdev NULL pointers and others.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/samsung-laptop.c

index 91c5fd8d07b90fdb443b3c07885b4546ad8086cf..59ac26c6a2adfd367479b3d24e5beff3730a5f66 100644 (file)
@@ -799,7 +799,7 @@ static int __init samsung_init(void)
        sabi_iface = ioremap_nocache(ifaceP, 16);
        if (!sabi_iface) {
                pr_err("Can't remap %x\n", ifaceP);
-               goto exit;
+               goto error_no_signature;
        }
        if (debug) {
                printk(KERN_DEBUG "ifaceP = 0x%08x\n", ifaceP);
@@ -851,7 +851,6 @@ static int __init samsung_init(void)
        if (retval)
                goto error_file_create;
 
-exit:
        return 0;
 
 error_file_create: