From: David Herrmann Date: Tue, 20 Sep 2011 16:16:12 +0000 (-0700) Subject: Platform: Fix error path in samsung-laptop init X-Git-Tag: firefly_0821_release~3680^2~4255^2~42 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a7ea19926ffba86f373f6050a106cd162dbb9a78;p=firefly-linux-kernel-4.4.55.git 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 Cc: stable Signed-off-by: Greg Kroah-Hartman Signed-off-by: Matthew Garrett --- diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c index 7eb6733138e6..4d3bed476d52 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) 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); @@ -833,7 +833,6 @@ static int __init samsung_init(void) if (retval) goto error_file_create; -exit: return 0; error_file_create: