summaryrefslogtreecommitdiff
path: root/drivers/misc/spear13xx_pcie_gadget.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-06-15 15:08:21 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-06-15 20:04:00 -0700
commit5a1e6f75831bf1f8e596d642cd8a2512f11548fc (patch)
tree5197511289ca5aa50073be5233c8cd4aa57e62de /drivers/misc/spear13xx_pcie_gadget.c
parent32e45ff43eaf5c17f5a82c9ad358d515622c2562 (diff)
downloadlinux-5a1e6f75831bf1f8e596d642cd8a2512f11548fc.tar.gz
linux-5a1e6f75831bf1f8e596d642cd8a2512f11548fc.tar.xz
drivers/misc/spear13xx_pcie_gadget.c: fix a memory leak in spear_pcie_gadget_probe error path
In the case of goto err_kzalloc, we should kfree target. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Pratyush Anand <pratyush.anand@st.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/spear13xx_pcie_gadget.c')
-rw-r--r--drivers/misc/spear13xx_pcie_gadget.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/spear13xx_pcie_gadget.c b/drivers/misc/spear13xx_pcie_gadget.c
index 7aded90f9daa..cfbddbef11de 100644
--- a/drivers/misc/spear13xx_pcie_gadget.c
+++ b/drivers/misc/spear13xx_pcie_gadget.c
@@ -845,7 +845,7 @@ err_iounmap:
err_iounmap_app:
iounmap(config->va_app_base);
err_kzalloc:
- kfree(config);
+ kfree(target);
err_rel_res:
release_mem_region(res1->start, resource_size(res1));
err_rel_res0: