From patchwork Sat Sep 26 21:37:19 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Walker X-Patchwork-Id: 50274 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8QLbrXA014639 for ; Sat, 26 Sep 2009 21:37:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753020AbZIZVhs (ORCPT ); Sat, 26 Sep 2009 17:37:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753017AbZIZVhs (ORCPT ); Sat, 26 Sep 2009 17:37:48 -0400 Received: from fifo99.com ([67.223.236.141]:56645 "EHLO fifo99.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752973AbZIZVhs (ORCPT ); Sat, 26 Sep 2009 17:37:48 -0400 Received: from smtp.fifo99.com (fifo99.com [67.223.236.141]) by fifo99.com (Postfix) with ESMTPSA id 17F2F226951D ; Sat, 26 Sep 2009 21:37:52 +0000 (UTC) From: Daniel Walker To: linux-omap@vger.kernel.org Cc: Daniel Walker , Julia Lawall , Kevin Hilman , Tony Lindgren Subject: [PATCH] arm: omap: iovmm: add missing mutex_unlock Date: Sat, 26 Sep 2009 14:37:19 -0700 Message-Id: <1254001039-27976-1-git-send-email-dwalker@fifo99.com> X-Mailer: git-send-email 1.6.0.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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 Cc: Kevin Hilman Cc: Tony Lindgren Signed-off-by: Daniel Walker Signed-off-by: Kevin Hilman --- 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);