]> err.no Git - linux-2.6/commit
ACPI: asus-laptop: Fix failure exits
authorAl Viro <viro@ftp.linux.org.uk>
Mon, 23 Jul 2007 10:21:34 +0000 (11:21 +0100)
committerLen Brown <len.brown@intel.com>
Mon, 23 Jul 2007 17:35:23 +0000 (13:35 -0400)
commit3b0d71170d37878bbb1203ebc3f92e36d6151a80
treef2371d2114c40f622a3f037df04d4e1684353171
parent3cc2649b879f0e83fd51b14c82bad5f8f208591e
ACPI: asus-laptop: Fix failure exits

> Subject         : drivers/misc/asus-laptop.c:*: error: 'struct led_classdev' has no member named 'class_dev'
> References      : http://lkml.org/lkml/2007/7/22/299
> Submitter       : Gabriel C <nix.or.die@googlemail.com>

Fallout from f8a7c6fe14f556ca8eeddce258cb21392d0c3a2f.  However, looking
at it shows that checks done in ASUS_LED_UNREGISTER() can't trigger
at all (we never get to asus_led_exit() if registration fails) and
if that registration fails, we actually leak stuff.  IOW, it's worse
than just replacing class_dev with dev in there - the tests themselves
had been papering over the lousy cleanup logics.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/misc/asus-laptop.c