Browse Source

88pm860x_charger: Drop kfree of devm_kzalloc'd data

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>
Jingoo Han 12 years ago
parent
commit
3f8060a5fe
1 changed files with 0 additions and 2 deletions
  1. 0 2
      drivers/power/88pm860x_charger.c

+ 0 - 2
drivers/power/88pm860x_charger.c

@@ -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;
 }