Platform: Fix error path in samsung-laptop init
commit50f621d8f5b6f9e8ed931df12c595fd0e882f8e3
authorDavid Herrmann <dh.herrmann@googlemail.com>
Tue, 20 Sep 2011 16:16:12 +0000 (20 09:16 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:35:48 +0000 (11 09:35 -0800)
treeceda6892f48dc5ce8054d9765ebdef0eacf338d4
parent08a84a609d1679c9aeb958c3bc7886118e682b77
Platform: Fix error path in samsung-laptop init

commit a7ea19926ffba86f373f6050a106cd162dbb9a78 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/samsung-laptop.c