From: Julia Lawall Date: Thu, 29 May 2008 13:04:38 +0000 (+0200) Subject: PCI: eliminate double kfree in intel-iommu initialization X-Git-Tag: v2.6.27-rc1~1046^2~44 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ece6763419f44ed72f4fc78752e5f5364df1794b;p=linux-2.6 PCI: eliminate double kfree in intel-iommu initialization The destination of goto error also does a kfree(g_iommus), so it is not correct to do one here. This was found using Coccinelle (http://www.emn.fr/x-info/coccinelle/). Signed-off-by: Julia Lawall Signed-off-by: Jesse Barnes --- diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 66c0fd2189..4f05d91a0f 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c @@ -1725,7 +1725,6 @@ int __init init_dmars(void) deferred_flush = kzalloc(g_num_of_iommus * sizeof(struct deferred_flush_tables), GFP_KERNEL); if (!deferred_flush) { - kfree(g_iommus); ret = -ENOMEM; goto error; }