提交 aee7a283 编写于 作者: M Michael Ellerman 提交者: 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: NEric Sesterhenn <eric.sesterhenn@lsexperts.de>
Acked-by: NMichael Ellerman <michael@ellerman.id.au>
Acked-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册