diff options
author | Raghav Dogra <raghav@freescale.com> | 2015-05-20 14:54:58 +0530 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2015-05-22 15:45:51 -0500 |
commit | 6b8583b0adac6c8119d2fc6fd4f03ed8373b5d42 (patch) | |
tree | dafe6d0741da374e96b45c086cb5840c4310cc37 /drivers/mtd/nand/fsl_elbc_nand.c | |
parent | 5e856fa8bec49b86e680626be772dd6b6aa3e5df (diff) |
nand/elbc: Memory leak fix
Freeing allocated memory to priv before returning
from the function
Signed-off-by: Raghav Dogra <raghav@freescale.com>
[scottwood: removed unnecessary cast]
Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'drivers/mtd/nand/fsl_elbc_nand.c')
-rw-r--r-- | drivers/mtd/nand/fsl_elbc_nand.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index e85832d319..b3a0edbf14 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c @@ -679,6 +679,7 @@ static int fsl_elbc_chip_init(int devnum, u8 *addr) if (priv->bank >= MAX_BANKS) { printf("fsl_elbc_nand: address did not match any " "chip selects\n"); + kfree(priv); return -ENODEV; } |