Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4e1328be authored by Tushar Behera's avatar Tushar Behera Committed by Samuel Ortiz
Browse files

mfd: ab8500-core: Fix invalid free of devm_ allocated data



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: default avatarTushar Behera <tushar.behera@linaro.org>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 13ea5813
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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;
}