Commit aee7a283 authored by Michael Ellerman's avatar Michael Ellerman Committed by Benjamin Herrenschmidt

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: default avatarEric Sesterhenn <eric.sesterhenn@lsexperts.de>
Acked-by: default avatarMichael Ellerman <michael@ellerman.id.au>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 11a50873
......@@ -365,7 +365,7 @@ static int axon_msi_probe(struct of_device *device,
printk(KERN_ERR
"axon_msi: couldn't parse dcr properties on %s\n",
dn->full_name);
goto out;
goto out_free_msic;
}
msic->dcr_host = dcr_map(dn, dcr_base, dcr_len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment