dell-laptop: fix a use-after-free error on the failure path
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Wed, 19 Aug 2009 14:06:47 +0000 (15:06 +0100)
committerLen Brown <len.brown@intel.com>
Thu, 10 Dec 2009 04:59:19 +0000 (23:59 -0500)
commit71e9dc73cb6b1351bdd5f732cef5dbef411b3219
tree968d57bf56ec08bfd82b600caf53626d02166990
parente1fbf346c7c56d6b2f9d835d297bcb088baaff3a
dell-laptop: fix a use-after-free error on the failure path

dell_setup_rfkill() already cleans up the rfkill devices on failure.
So if it returns an error, we should not try to unregister the rfkill
devices.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Acked-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/platform/x86/dell-laptop.c