aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2009-10-12 10:29:40 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-10-14 01:58:36 -0400
commitaee7a283bb1e7d722f3431e0689c2c281ad0c1f6 (patch)
tree4a4fdf132e5fd2212276d630c2ef7d3d4d9cef8b
parent11a50873ef2b3c1c3fe99a661c22c08f35d93553 (diff)
powerpc: Fix memory leak in axon_msi.c
cppcheck found a memory leak in axon_msi, if dcr_base or dcr_len are zero, we have already allocated msic, so we should free it in the error path. Signed-off-by: Eric Sesterhenn <eric.sesterhenn@lsexperts.de> Acked-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/platforms/cell/axon_msi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c
index aca5741ddc67..a86c34b3bb84 100644
--- a/arch/powerpc/platforms/cell/axon_msi.c
+++ b/arch/powerpc/platforms/cell/axon_msi.c
@@ -365,7 +365,7 @@ static int axon_msi_probe(struct of_device *device,
365 printk(KERN_ERR 365 printk(KERN_ERR
366 "axon_msi: couldn't parse dcr properties on %s\n", 366 "axon_msi: couldn't parse dcr properties on %s\n",
367 dn->full_name); 367 dn->full_name);
368 goto out; 368 goto out_free_msic;
369 } 369 }
370 370
371 msic->dcr_host = dcr_map(dn, dcr_base, dcr_len); 371 msic->dcr_host = dcr_map(dn, dcr_base, dcr_len);