lis3lv02d: correct memory leak in module unload
authorSamu Onkalo <samu.p.onkalo@nokia.com>
Tue, 15 Dec 2009 02:01:39 +0000 (18:01 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Dec 2009 16:53:36 +0000 (08:53 -0800)
polled input device itself was not free'd.

Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Tested-by: Éric Piel <eric.piel@tremplin-utc.net>
Acked-by: Éric Piel <eric.piel@tremplin-utc.net>
Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/hwmon/lis3lv02d.c

index 7f43a3b62a2471ac2fb55378dfd862ff562e6c4d..dbd0b055d4b9317d750a286c4ae01dfc675d84a2 100644 (file)
@@ -333,6 +333,7 @@ void lis3lv02d_joystick_disable(void)
        if (lis3_dev.irq)
                misc_deregister(&lis3lv02d_misc_device);
        input_unregister_polled_device(lis3_dev.idev);
+       input_free_polled_device(lis3_dev.idev);
        lis3_dev.idev = NULL;
 }
 EXPORT_SYMBOL_GPL(lis3lv02d_joystick_disable);