hp-wmi: fix error path in hp_wmi_bios_setup()
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 4 Feb 2009 23:12:07 +0000 (15:12 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 5 Feb 2009 20:56:47 +0000 (12:56 -0800)
commit44f0606d52d98ff05b3b62bb694821857e36819d
tree9aec0abf691fbe2d264c653dc7d445e63523f696
parent60fd760fb9ff7034360bab7137c917c0330628c2
hp-wmi: fix error path in hp_wmi_bios_setup()

The error-path code can call rfkill_unregister() with a pointer which does
not contain the result of a call to rfkill_register().  It goes BUG().

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=12560.

Cc: Frans Pop <elendil@planet.nl>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Len Brown <lenb@kernel.org>
Acked-by: Matthew Garrett <mjg@redhat.com>
Reported-by: Helge Deller <deller@gmx.de>
Testted-by: Helge Deller <deller@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/platform/x86/hp-wmi.c