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 <mwang@codeaurora.org>
This commit is contained in:
Meng Wang 2016-07-27 15:55:05 +08:00 committed by Gerrit - the friendly Code Review server
parent 59ff3301d5
commit 115b1e7c4e

View file

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