forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
11a50873ef
commit
aee7a283bb
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user