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: 19616 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CD69225E4D for ; Thu, 29 Aug 2013 17:19:55 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id f10sf830786yha.4 for ; Thu, 29 Aug 2013 10:19:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=S5/Pi01+vSPBmQreEFjSmekFnHrWn+9OLX+C2G3/Aio=; b=LMsoIcC6DJJBvbCFydoWmPLbBHvidXBb1ejZ1DKRT6zjeWgGr7k9tL+P+/cQQZBvUx APvWpK7w7nkQvZNLVuuvdgdyh/Xza9lZW/cKrn4Mx9MtWg4NsKYfMdddjXcBujhWE8fS /+u7Bagxd4RGXNhuYTk20QGPvomDirol9fifIzY9BM99zwYPbFOuI0nZJt/ZI8K30W5X hlHCW6bRzeiUaJAjoo9+hGcR3H122kNrksCmIf5wUFZH9VPVDipfWttel4H0kw30uKIr sqpq57eTHIGYyenP5RcC9/VLMwH13bJpFZ7yb9IOPCuaV+gQjhe43h68YeCcTAM69SgR mtUw== X-Received: by 10.236.18.196 with SMTP id l44mr1557571yhl.52.1377796795326; Thu, 29 Aug 2013 10:19:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.16.103 with SMTP id f7ls982942qed.77.gmail; Thu, 29 Aug 2013 10:19:55 -0700 (PDT) X-Received: by 10.52.22.14 with SMTP id z14mr117275vde.49.1377796795097; Thu, 29 Aug 2013 10:19:55 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id s3si8383731vcm.76.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Aug 2013 10:19:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id gd11so527680vcb.5 for ; Thu, 29 Aug 2013 10:19:54 -0700 (PDT) X-Gm-Message-State: ALoCoQnY00+SZLZMsMyl30ji735cAAkWmNKvsONy7lPnZ2Cas4MYzclVBvhEqfdZQLxASpk+dQlE X-Received: by 10.52.98.7 with SMTP id ee7mr1227636vdb.37.1377796794727; Thu, 29 Aug 2013 10:19:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp35411vcz; Thu, 29 Aug 2013 10:19:54 -0700 (PDT) X-Received: by 10.15.41.205 with SMTP id s53mr5094721eev.63.1377796793535; Thu, 29 Aug 2013 10:19:53 -0700 (PDT) Received: from mail-ea0-f180.google.com (mail-ea0-f180.google.com [209.85.215.180]) by mx.google.com with ESMTPS id l45si4400391eep.124.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Aug 2013 10:19:53 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.215.180 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.215.180; Received: by mail-ea0-f180.google.com with SMTP id h10so389838eaj.25 for ; Thu, 29 Aug 2013 10:19:52 -0700 (PDT) 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 Cc: Stephen Warren , Linus Walleij , Maxime Ripard 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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