eeepc-laptop: fix use after free

eeepc-laptop uses the hwmon struct after unregistering the device, causing
an oops on module unload. Flip the ordering to fix.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Karol Kozimor <sziwan@users.sourceforge.net>
Cc: <stable@kernel.org> [2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Matthew Garrett and committed by Linus Torvalds f1441318 0c7281c0

+1 -1
+1 -1
drivers/misc/eeepc-laptop.c
··· 553 553 hwmon = eeepc_hwmon_device; 554 554 if (!hwmon) 555 555 return ; 556 - hwmon_device_unregister(hwmon); 557 556 sysfs_remove_group(&hwmon->kobj, 558 557 &hwmon_attribute_group); 558 + hwmon_device_unregister(hwmon); 559 559 eeepc_hwmon_device = NULL; 560 560 } 561 561