Skip to content

Commit

Permalink
Platform: Fix error path in samsung-laptop init
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David Herrmann authored and Matthew Garrett committed Oct 24, 2011
1 parent bee460b commit a7ea199
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/platform/x86/samsung-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,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);
Expand Down Expand Up @@ -833,7 +833,6 @@ static int __init samsung_init(void)
if (retval)
goto error_file_create;

exit:
return 0;

error_file_create:
Expand Down

0 comments on commit a7ea199

Please sign in to comment.