]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/3.1.1/platform-fix-error-path-in-samsung-laptop-init.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.1.1 / platform-fix-error-path-in-samsung-laptop-init.patch
1 From a7ea19926ffba86f373f6050a106cd162dbb9a78 Mon Sep 17 00:00:00 2001
2 From: David Herrmann <dh.herrmann@googlemail.com>
3 Date: Tue, 20 Sep 2011 09:16:12 -0700
4 Subject: Platform: Fix error path in samsung-laptop init
5
6 From: David Herrmann <dh.herrmann@googlemail.com>
7
8 commit a7ea19926ffba86f373f6050a106cd162dbb9a78 upstream.
9
10 samsung_init() should not return success if not all devices are initialized.
11 Otherwise, samsung_exit() will dereference sdev NULL pointers and others.
12
13 Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
14 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 Signed-off-by: Matthew Garrett <mjg@redhat.com>
16
17 ---
18 drivers/platform/x86/samsung-laptop.c | 3 +--
19 1 file changed, 1 insertion(+), 2 deletions(-)
20
21 --- a/drivers/platform/x86/samsung-laptop.c
22 +++ b/drivers/platform/x86/samsung-laptop.c
23 @@ -799,7 +799,7 @@ static int __init samsung_init(void)
24 sabi_iface = ioremap_nocache(ifaceP, 16);
25 if (!sabi_iface) {
26 pr_err("Can't remap %x\n", ifaceP);
27 - goto exit;
28 + goto error_no_signature;
29 }
30 if (debug) {
31 printk(KERN_DEBUG "ifaceP = 0x%08x\n", ifaceP);
32 @@ -851,7 +851,6 @@ static int __init samsung_init(void)
33 if (retval)
34 goto error_file_create;
35
36 -exit:
37 return 0;
38
39 error_file_create: