summaryrefslogtreecommitdiff
path: root/drivers/platform/x86
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2011-09-20 09:16:12 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-11 09:42:54 -0800
commit2a8796e3653ee5a99c16e029b22ec78b14818286 (patch)
treec5dc533372201c3a779d02a3ec0adb5baf8a8453 /drivers/platform/x86
parent9cb3ef17ebb449a3ae6deb564463b611fa945c32 (diff)
Platform: Fix error path in samsung-laptop init
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>
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r--drivers/platform/x86/samsung-laptop.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
index 91c5fd8d07b9..59ac26c6a2ad 100644
--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -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: