From patchwork Fri Sep 14 18:25:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1460011 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 15075402E1 for ; Fri, 14 Sep 2012 18:25:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753453Ab2INSZT (ORCPT ); Fri, 14 Sep 2012 14:25:19 -0400 Received: from perceval.ideasonboard.com ([95.142.166.194]:44588 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752642Ab2INSZT (ORCPT ); Fri, 14 Sep 2012 14:25:19 -0400 Received: from avalon.ideasonboard.com (unknown [91.178.151.136]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D7A1835A89; Fri, 14 Sep 2012 20:25:17 +0200 (CEST) From: Laurent Pinchart To: linux-sh@vger.kernel.org Cc: Paul Mundt Subject: [PATCH] sh: pfc: Release spinlock in sh_pfc_gpio_request_enable() error path Date: Fri, 14 Sep 2012 20:25:48 +0200 Message-Id: <1347647148-28117-1-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.7.8.6 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org The sh_pfc_gpio_request_enable() function acquires a spinlock but fails to release it before returning if the requested mux type is not supported. Fix this. Signed-off-by: Laurent Pinchart --- drivers/sh/pfc/pinctrl.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) This is a v3.6 regression. diff --git a/drivers/sh/pfc/pinctrl.c b/drivers/sh/pfc/pinctrl.c index 2804eaa..a3ac39b 100644 --- a/drivers/sh/pfc/pinctrl.c +++ b/drivers/sh/pfc/pinctrl.c @@ -211,7 +211,8 @@ static int sh_pfc_gpio_request_enable(struct pinctrl_dev *pctldev, break; default: pr_err("Unsupported mux type (%d), bailing...\n", pinmux_type); - return -ENOTSUPP; + ret = -ENOTSUPP; + goto err; } ret = 0;