input: misc: bmp180: remove input_free_device call from bmp_remove
Krishna Reddy [Fri, 30 Aug 2013 19:15:15 +0000 (12:15 -0700)]
This is not necessary as input_unregister_device internally calls
input_free_device. Calling this is causing access of already freed
dev memory.

Change-Id: I9f50f3b1359d00ba9ef97515afd22cb290cd540d
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/268664
Reviewed-by: Joshua Cha <joshuac@nvidia.com>

drivers/input/misc/pressure/bmp180.c

index 2f0c24e..bd4757d 100644 (file)
@@ -1620,10 +1620,8 @@ static int bmp_remove(struct i2c_client *client)
 
        inf = i2c_get_clientdata(client);
        if (inf != NULL) {
-               if (inf->idev) {
+               if (inf->idev)
                        input_unregister_device(inf->idev);
-                       input_free_device(inf->idev);
-               }
                if (inf->wq)
                        destroy_workqueue(inf->wq);
                bmp_pm_exit(inf);