omap: iovmm: Add missing mutex_unlock
authorDaniel Walker <dwalker@fifo99.com>
Mon, 5 Oct 2009 20:31:45 +0000 (13:31 -0700)
committerTony Lindgren <tony@atomide.com>
Tue, 6 Oct 2009 15:31:50 +0000 (08:31 -0700)
I was using Coccinelle with the mutex_unlock semantic patch, and it
unconvered this problem. It appears to be a valid missing unlock issue.
This change should correct it by moving the unlock below the label.

This patch is against the mainline kernel.

Cc: Julia Lawall <julia@diku.dk>
Cc: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Daniel Walker <dwalker@fifo99.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/plat-omap/iovmm.c

index 0e5573d5bb573a1502d669fd7d9d508d2386222d..dc3fac3dd0eac8c40787ea8e3006e6a59ce19e80 100644 (file)
@@ -363,8 +363,9 @@ void *da_to_va(struct iommu *obj, u32 da)
                goto out;
        }
        va = area->va;
-       mutex_unlock(&obj->mmap_lock);
 out:
+       mutex_unlock(&obj->mmap_lock);
+
        return va;
 }
 EXPORT_SYMBOL_GPL(da_to_va);