summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/iovmm.c
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2010-07-06 19:45:24 +0200
committerChris Metcalf <cmetcalf@tilera.com>2010-07-06 19:45:24 +0200
commita2262d8a231e92742651859a10c9a4430a5e899a (patch)
treeb5a823e3f6a3f60e1dd995f113caf0b350228d84 /arch/arm/plat-omap/iovmm.c
parentarch/tile: catch up on various minor cleanups. (diff)
parentLinux 2.6.35-rc4 (diff)
downloadlinux-a2262d8a231e92742651859a10c9a4430a5e899a.tar.xz
linux-a2262d8a231e92742651859a10c9a4430a5e899a.zip
Merge branch 'master' into for-linus
Diffstat (limited to 'arch/arm/plat-omap/iovmm.c')
-rw-r--r--arch/arm/plat-omap/iovmm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c
index e43983ba59c5..8ce0de247c71 100644
--- a/arch/arm/plat-omap/iovmm.c
+++ b/arch/arm/plat-omap/iovmm.c
@@ -140,8 +140,10 @@ static struct sg_table *sgtable_alloc(const size_t bytes, u32 flags)
return ERR_PTR(-ENOMEM);
err = sg_alloc_table(sgt, nr_entries, GFP_KERNEL);
- if (err)
+ if (err) {
+ kfree(sgt);
return ERR_PTR(err);
+ }
pr_debug("%s: sgt:%p(%d entries)\n", __func__, sgt, nr_entries);