All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@fifo99.com>
To: linux-omap@vger.kernel.org
Cc: Daniel Walker <dwalker@fifo99.com>, Julia Lawall <julia@diku.dk>,
	Kevin Hilman <khilman@deeprooted.net>,
	Tony Lindgren <tony@atomide.com>
Subject: [PATCH] arm: omap: iovmm: add missing mutex_unlock
Date: Sat, 26 Sep 2009 14:37:19 -0700	[thread overview]
Message-ID: <1254001039-27976-1-git-send-email-dwalker@fifo99.com> (raw)

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: Kevin Hilman <khilman@deeprooted.net>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Daniel Walker <dwalker@fifo99.com>
---
 arch/arm/plat-omap/iovmm.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c
index 57f7122..9b6cb90 100644
--- a/arch/arm/plat-omap/iovmm.c
+++ b/arch/arm/plat-omap/iovmm.c
@@ -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);
-- 
1.6.0.4


             reply	other threads:[~2009-09-26 21:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-26 21:37 Daniel Walker [this message]
2009-09-28 16:51 ` [PATCH] arm: omap: iovmm: add missing mutex_unlock Kevin Hilman
2009-10-02 21:55 ` [APPLIED] " Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1254001039-27976-1-git-send-email-dwalker@fifo99.com \
    --to=dwalker@fifo99.com \
    --cc=julia@diku.dk \
    --cc=khilman@deeprooted.net \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.