Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a7ea1992 authored by David Herrmann's avatar David Herrmann Committed by Matthew Garrett
Browse files

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: default avatarDavid Herrmann <dh.herrmann@googlemail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent bee460be
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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: