aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/samsung-laptop.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2011-09-20 12:16:12 -0400
committerMatthew Garrett <mjg@redhat.com>2011-10-24 10:52:35 -0400
commita7ea19926ffba86f373f6050a106cd162dbb9a78 (patch)
tree4c6da04869eefdf754bfb3c60b29b24dd9d2640b /drivers/platform/x86/samsung-laptop.c
parentbee460be8c691c544e84ed678280ace6153104c6 (diff)
Platform: Fix error path in samsung-laptop init
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> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform/x86/samsung-laptop.c')
-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 7eb6733138e..4d3bed476d5 100644
--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -781,7 +781,7 @@ static int __init samsung_init(void)
781 sabi_iface = ioremap_nocache(ifaceP, 16); 781 sabi_iface = ioremap_nocache(ifaceP, 16);
782 if (!sabi_iface) { 782 if (!sabi_iface) {
783 pr_err("Can't remap %x\n", ifaceP); 783 pr_err("Can't remap %x\n", ifaceP);
784 goto exit; 784 goto error_no_signature;
785 } 785 }
786 if (debug) { 786 if (debug) {
787 printk(KERN_DEBUG "ifaceP = 0x%08x\n", ifaceP); 787 printk(KERN_DEBUG "ifaceP = 0x%08x\n", ifaceP);
@@ -833,7 +833,6 @@ static int __init samsung_init(void)
833 if (retval) 833 if (retval)
834 goto error_file_create; 834 goto error_file_create;
835 835
836exit:
837 return 0; 836 return 0;
838 837
839error_file_create: 838error_file_create: