extcon: max8997: Add missing kfree for info->edev in max8997_muic_remove()
authorAxel Lin <axel.lin@gmail.com>
Sat, 16 Jun 2012 13:25:11 +0000 (21:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Jun 2012 23:30:42 +0000 (16:30 -0700)
extcon_dev_unregister(info->edev) doest not free info->edev, we need to call
kfree(info->edev) here.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/extcon/extcon-max8997.c

index 5ecf176..a4ed30b 100644 (file)
@@ -514,6 +514,7 @@ static int __devexit max8997_muic_remove(struct platform_device *pdev)
 
        extcon_dev_unregister(info->edev);
 
+       kfree(info->edev);
        kfree(info);
 
        return 0;