88pm860x_charger: Drop kfree of devm_kzalloc'd data
authorJingoo Han <jg1.han@samsung.com>
Mon, 11 Mar 2013 06:30:40 +0000 (15:30 +0900)
committerAnton Vorontsov <anton@enomsg.org>
Mon, 1 Apr 2013 06:25:17 +0000 (23:25 -0700)
The devm_kzalloc function allocates memory that is released automatically,
when a driver detaches. Thus, there is no reason to explicitly call kfree
in probe or remove functions.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
drivers/power/88pm860x_charger.c

index 4b37a5a..36fb4b5 100644 (file)
@@ -714,7 +714,6 @@ out_irq:
        while (--i >= 0)
                free_irq(info->irq[i], info);
 out:
-       kfree(info);
        return ret;
 }
 
@@ -728,7 +727,6 @@ static int pm860x_charger_remove(struct platform_device *pdev)
        free_irq(info->irq[0], info);
        for (i = 0; i < info->irq_nums; i++)
                free_irq(info->irq[i], info);
-       kfree(info);
        return 0;
 }