Skip to content

Commit 4da0ea7

Browse files
Dan Carpentermiquelraynal
authored andcommitted
mtd: lpddr: Fix a double free in probe()
This function is only called from lpddr_probe(). We free "lpddr" both here and in the caller, so it's a double free. The best place to free "lpddr" is in lpddr_probe() so let's delete this one. Fixes: 8dc0043 ("[MTD] LPDDR qinfo probing.") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent c0b66dc commit 4da0ea7

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/mtd/lpddr/lpddr_cmds.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ struct mtd_info *lpddr_cmdset(struct map_info *map)
6868
shared = kmalloc_array(lpddr->numchips, sizeof(struct flchip_shared),
6969
GFP_KERNEL);
7070
if (!shared) {
71-
kfree(lpddr);
7271
kfree(mtd);
7372
return NULL;
7473
}

0 commit comments

Comments
 (0)