From patchwork Wed Jun 24 14:54:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 50276 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 37CFC21575 for ; Wed, 24 Jun 2015 14:54:35 +0000 (UTC) Received: by wguu7 with SMTP id u7sf11844973wgu.0 for ; Wed, 24 Jun 2015 07:54:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:content-type:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=P5QMG5At9Fo7VnRDtYvq5vjvcEuVbbFb/40lEvEDzdQ=; b=ZBSxLiJvfLGYi+6EDEBaa/0HT+k9UMRdkKPxdOA3f3+ifjsyAU+248I0cjC7pXlmzU TXXQHnfiBkkRpduSEzoZtyJUKZLQoG/M+NXb0MezQD9RhME0Ha9HxkLj1iFO5yqE8nQE Jp7os8qP17HXKebU1pvLVE2coEQaWf/wd9rCc9hjgsW/KX4+tHCCmmpPRQUqgs+1Quxb QgcIqhqlTZklgds8lJ64Xw/CbZuERCkP5UDpq8TLRj1tc1wPkJP7lbxHo72nNejgvP// RWsez1w4nvltUTop7rCD+79DZng0mnzfDBd1eWnL6W2isOGmPSsCp60k98ZtsLi95Nlt j9ow== X-Gm-Message-State: ALoCoQnyI0nPH2RXnfbEN+IWcQnhZUVuIStjMW8KthhfbBxlfq+aoeFhpenoMcC0g3IEOe64C9aY X-Received: by 10.152.87.146 with SMTP id ay18mr13818433lab.6.1435157673863; Wed, 24 Jun 2015 07:54:33 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.8.1 with SMTP id n1ls183945laa.87.gmail; Wed, 24 Jun 2015 07:54:33 -0700 (PDT) X-Received: by 10.112.154.71 with SMTP id vm7mr39590453lbb.96.1435157673749; Wed, 24 Jun 2015 07:54:33 -0700 (PDT) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com. [209.85.217.174]) by mx.google.com with ESMTPS id dx7si22216143lbd.79.2015.06.24.07.54.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jun 2015 07:54:33 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) client-ip=209.85.217.174; Received: by lbbpo10 with SMTP id po10so27970220lbb.3 for ; Wed, 24 Jun 2015 07:54:33 -0700 (PDT) X-Received: by 10.152.88.68 with SMTP id be4mr39444841lab.76.1435157673344; Wed, 24 Jun 2015 07:54:33 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp3844928lbb; Wed, 24 Jun 2015 07:54:32 -0700 (PDT) X-Received: by 10.70.118.5 with SMTP id ki5mr81975652pdb.6.1435157671473; Wed, 24 Jun 2015 07:54:31 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ee10si40306766pac.152.2015.06.24.07.54.30; Wed, 24 Jun 2015 07:54:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752536AbbFXOy2 (ORCPT + 2 others); Wed, 24 Jun 2015 10:54:28 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:40956 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752765AbbFXOy1 (ORCPT ); Wed, 24 Jun 2015 10:54:27 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id t5OEsMR8021994; Wed, 24 Jun 2015 09:54:22 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t5OEsM6p028733; Wed, 24 Jun 2015 09:54:22 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Wed, 24 Jun 2015 09:54:22 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id t5OEsLtX024180; Wed, 24 Jun 2015 09:54:21 -0500 From: Grygorii Strashko To: Linus Walleij , Alexandre Courbot CC: Sekhar Nori , Javier Martinez Canillas , , , , , Grygorii Strashko Subject: [4.2-rc1][PATCH] gpio: omap: add missed spin_unlock_irqrestore in omap_gpio_irq_type Date: Wed, 24 Jun 2015 17:54:17 +0300 Message-ID: <1435157657-17843-1-git-send-email-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.4.4 MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-gpio@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: patch@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Grygorii Strashko Add missed spin_unlock_irqrestore in omap_gpio_irq_type when omap_set_gpio_triggering() is failed. It fixes static checker warning: drivers/gpio/gpio-omap.c:523 omap_gpio_irq_type() warn: inconsistent returns 'spin_lock:&bank->lock'. This fixes commit: 1562e4618ded ('gpio: omap: fix error handling in omap_gpio_irq_type') Reported-by: Javier Martinez Canillas Signed-off-by: Grygorii Strashko --- drivers/gpio/gpio-omap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index b0c57d5..a0ad803 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -500,8 +500,10 @@ static int omap_gpio_irq_type(struct irq_data *d, unsigned type) spin_lock_irqsave(&bank->lock, flags); retval = omap_set_gpio_triggering(bank, offset, type); - if (retval) + if (retval) { + spin_unlock_irqrestore(&bank->lock, flags); goto error; + } omap_gpio_init_irq(bank, offset); if (!omap_gpio_is_input(bank, offset)) { spin_unlock_irqrestore(&bank->lock, flags);