Commit 76d067ac authored by Prabhakar Kushwaha's avatar Prabhakar Kushwaha Committed by Scott Wood
Browse files

driver/mtd:IFC: Fix possible memory leak

if priv->bank >= MAX_BANK, priv should be freed before returning ENODEV.
Signed-off-by: default avatarPrabhakar Kushwaha <>
Signed-off-by: default avatarScott Wood <>
parent 807fc702
......@@ -775,6 +775,7 @@ int board_nand_init(struct nand_chip *nand)
if (priv->bank >= MAX_BANKS) {
printf("%s: address did not match any "
"chip selects\n", __func__);
return -ENODEV;
Supports Markdown
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