Platform: Fix error path in samsung-laptop init
authorDavid Herrmann <dh.herrmann@googlemail.com>
Tue, 20 Sep 2011 16:16:12 +0000 (09:16 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:42:54 +0000 (09:42 -0800)
commit2a8796e3653ee5a99c16e029b22ec78b14818286
treec5dc533372201c3a779d02a3ec0adb5baf8a8453
parent9cb3ef17ebb449a3ae6deb564463b611fa945c32
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