Skip to content

Commit

Permalink
mfd: ab8500-core: Fix invalid free of devm_ allocated data
Browse files Browse the repository at this point in the history
The objects allocated by devm_* APIs are managed by devres and are
freed when the device is detached. Hence there is no need to remove
them explicitly in remove function.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Tushar Behera authored and Samuel Ortiz committed Nov 30, 2012
1 parent 13ea581 commit 4e1328b
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/mfd/ab8500-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1437,11 +1437,6 @@ static int __devexit ab8500_remove(struct platform_device *pdev)
sysfs_remove_group(&ab8500->dev->kobj, &ab8500_attr_group);

mfd_remove_devices(ab8500->dev);
free_irq(ab8500->irq, ab8500);

kfree(ab8500->oldmask);
kfree(ab8500->mask);
kfree(ab8500);

return 0;
}
Expand Down

0 comments on commit 4e1328b

Please sign in to comment.