From patchwork Thu Aug 29 17:19:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 2851522 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D630C9F2F4 for ; Thu, 29 Aug 2013 17:20:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD69620451 for ; Thu, 29 Aug 2013 17:20:34 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 73EBE20437 for ; Thu, 29 Aug 2013 17:20:33 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VF5tR-0008Li-70; Thu, 29 Aug 2013 17:20:25 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VF5tL-0002Wp-Il; Thu, 29 Aug 2013 17:20:19 +0000 Received: from mail-ea0-f177.google.com ([209.85.215.177]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VF5tG-0002Vk-Uq for linux-arm-kernel@lists.infradead.org; Thu, 29 Aug 2013 17:20:16 +0000 Received: by mail-ea0-f177.google.com with SMTP id f15so390129eak.36 for ; Thu, 29 Aug 2013 10:19:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=S5/Pi01+vSPBmQreEFjSmekFnHrWn+9OLX+C2G3/Aio=; b=Eta2bi6IzWr89Cg4fi9fvhlr7nZ3IULGFRacY+Iur+eMfahrRzXb+7wKkx+N/VWv22 xGasycTCya++2mfLhg7yhGk+OuKq7882AqnEs1W4c30kP6dPQhxUi0Q3xcR2uxJjmvyN 5z/W0esqPNHeEDn5XRjFXAjzBGDWVm04Y2vctV9ZcOtO7BOCfm4hPe6p+oxzKp/KIGsw m3/jaBx/OqEenrA2TDenNqPslPVlIQG0Bj6fY3i6IxqEqx3Vpcl0Kpaeys5FoEqeXlpj 7XuAAnZ1dEHT6jFpYrHCJuAVQ2IIFAoRWuWXJSbbQeViDVoohnDSdcWwcrJiy1FrK8Uc f55g== X-Gm-Message-State: ALoCoQnvx/tPPAwdSucwlM+oKfGjXfai6a2sZ97OuNOKhE1Gylb67isbljLep8NcdhjvGg7Vg6x2 X-Received: by 10.15.48.67 with SMTP id g43mr5910019eew.17.1377796792454; Thu, 29 Aug 2013 10:19:52 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id a6sm47780978eei.10.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 29 Aug 2013 10:19:51 -0700 (PDT) From: Linus Walleij To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] pinctrl: sunxi: drop lock on error path Date: Thu, 29 Aug 2013 19:19:44 +0200 Message-Id: <1377796784-31147-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130829_132015_126337_388FF1AC X-CRM114-Status: GOOD ( 11.16 ) X-Spam-Score: -2.6 (--) Cc: Linus Walleij , Stephen Warren , Maxime Ripard X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I forgot to drop the lock for the return inside the loop protected by the spinlock in the pin config routine when merging in -rc7 in commit 6ad30ce046aefbdc3848232c665a728860d7bb68 Reported-by: Sherman Yin Cc: Maxime Ripard Signed-off-by: Linus Walleij Acked-by: Maxime Ripard --- drivers/pinctrl/pinctrl-sunxi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-sunxi.c b/drivers/pinctrl/pinctrl-sunxi.c index 532202b..4432e5e 100644 --- a/drivers/pinctrl/pinctrl-sunxi.c +++ b/drivers/pinctrl/pinctrl-sunxi.c @@ -291,8 +291,10 @@ static int sunxi_pconf_group_set(struct pinctrl_dev *pctldev, switch (pinconf_to_config_param(configs[i])) { case PIN_CONFIG_DRIVE_STRENGTH: strength = pinconf_to_config_argument(configs[i]); - if (strength > 40) + if (strength > 40) { + spin_unlock_irqrestore(&pctl->lock, flags); return -EINVAL; + } /* * We convert from mA to what the register expects: * 0: 10mA