eeepc-laptop: fix use after free
authorMatthew Garrett <mjg59@srcf.ucam.org>
Wed, 20 Aug 2008 21:08:57 +0000 (14:08 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Aug 2008 22:40:30 +0000 (15:40 -0700)
commitf14413184b1de4dcbd5ec3e7c129c3ce2079f543
treeaf063aad59d9cdb851a0549cd29d529c37a32863
parent0c7281c0faa1d0bdbdc647430cbdf7e0aed7f385
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>
drivers/misc/eeepc-laptop.c