summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBhavesh Parekh <bparekh@nvidia.com>2011-12-14 12:09:14 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2011-12-21 12:06:23 +0530
commitb0a273f14d55a3d82ce099238ebf546e47aff4f9 (patch)
tree03844e0f5852b70a8a27f2378efc13f56fd45e2c /drivers
parentce040eccc18e9c892111c1fc7f054c219cdb33f6 (diff)
tegra: nand: fix memory leak in cleanup code
Bug 913416 Change-Id: I19f45bcd2c1ef9cb625728294b1dd53695e7d64b Signed-off-by: Bhavesh Parekh <bparekh@nvidia.com> Reviewed-on: http://git-master/r/69938 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: David Schalig <dschalig@nvidia.com> Tested-by: David Schalig <dschalig@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/devices/tegra_nand.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mtd/devices/tegra_nand.c b/drivers/mtd/devices/tegra_nand.c
index 9549a0322c92..54f4c1f67436 100644
--- a/drivers/mtd/devices/tegra_nand.c
+++ b/drivers/mtd/devices/tegra_nand.c
@@ -1667,7 +1667,7 @@ static int __devinit tegra_nand_probe(struct platform_device *pdev)
err = device_create_file(&pdev->dev, &dev_attr_device_id);
if (err != 0)
- goto out_free_bbbmap;
+ goto out_free_rw_buffer;
err = device_create_file(&pdev->dev, &dev_attr_vendor_id);
if (err != 0)
@@ -1700,6 +1700,9 @@ err_nand_sysfs_flash_size_failed:
err_nand_sysfs_vendorid_failed:
device_remove_file(&pdev->dev, &dev_attr_device_id);
+out_free_rw_buffer:
+ kfree(info->partial_unaligned_rw_buffer);
+
out_free_bbbmap:
kfree(info->bb_bitmap);