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 | |
parent | 5e856fa8bec49b86e680626be772dd6b6aa3e5df (diff) | |
download | u-boot-imx-6b8583b0adac6c8119d2fc6fd4f03ed8373b5d42.zip u-boot-imx-6b8583b0adac6c8119d2fc6fd4f03ed8373b5d42.tar.gz u-boot-imx-6b8583b0adac6c8119d2fc6fd4f03ed8373b5d42.tar.bz2 |
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')
-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 e85832d..b3a0edb 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; } |