From 115b1e7c4e7d1d58de4e96f0d64056dde6ebebb1 Mon Sep 17 00:00:00 2001 From: Meng Wang Date: Wed, 27 Jul 2016 15:55:05 +0800 Subject: ASoC: wcd9xxx: set pointer to null after kfree In wcd core drivers, some pointers are not set as NULL after the memory is freed, which will leave many dangling pointers. Set them to NULL explicitly to avoid potential risk. CRs-Fixed: 997062 Change-Id: I5dd4a9dd8f757d0850d75575d7e522e2a22f46f3 Signed-off-by: Meng Wang --- drivers/mfd/wcd9xxx-irq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mfd/wcd9xxx-irq.c b/drivers/mfd/wcd9xxx-irq.c index 1b93c83ae98e..0c5754341991 100644 --- a/drivers/mfd/wcd9xxx-irq.c +++ b/drivers/mfd/wcd9xxx-irq.c @@ -741,6 +741,7 @@ static int wcd9xxx_irq_remove(struct platform_device *pdev) wmb(); irq_domain_remove(data->domain); kfree(data); + domain->host_data = NULL; return 0; } -- cgit v1.2.3