From patchwork Mon Jun 10 17:11:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 166355 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1274120ilk; Mon, 10 Jun 2019 10:13:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqzl5j6OMKlVlO9hNbIXvGjruwUSFBuSrUcsHc8os5dp+aissgF/76eRAs8mV8SSTg08mWhk X-Received: by 2002:a17:902:9a90:: with SMTP id w16mr69660270plp.113.1560186810888; Mon, 10 Jun 2019 10:13:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560186810; cv=none; d=google.com; s=arc-20160816; b=eGEsUta1cX3emb8lsNYu8mxOFX+fbK3reNyNWkOD7xsXCbOSvRcoMhQNmBnQtEQF+C oIu9VIPIbXJbQtVggz5dYdx4XvEPuJSU4SgI2vBWxHgRhgVdZ5yUqMhkXxo5TRwvY9UK A0RCriR8DQvYZMv2ZoQ9egcCMVCZSdC4ZKPX1pv9t3hUdoeOERnlOASuQukf+OMm18tq VcNsGm5z4mWcCGPtC8747awohE/N/3E3py9A4mfoqUD2Pgmcw8IwF2IOyaz+EnCWzQBd yWueAnJt8BxgF28Bra+4wCDhe1ECHORpSFB6YeTHJvvWB8uP6bsHyX92q7EO7tnHqtCT 9MHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=65y0Cnd2F217f0FjndQy2sPV2LzXGcSYmUp9Flgkgvs=; b=D+ou6BtnwsikOKsxOmsWq0POZfQHUl6kgc6XLTaGflCafL+nqOqFGsgzEL7WVSRDvX 0gQjO+K9+Cn75+ZV1gzL0s+w3fpmUSXzTPYMJbCwGGI4u/7MJ4bdCkMXW0FInTVoEcq2 4lrPwGK1jO2jxFeyzEoWBOuOeHLB+ZaltQEK4FMezFNtGJxa1hWlVJTGR02sIcc0Jh1R /HlStxvDjXI1PQx8iYNtOTD7GwsFeexo+oOWghI0shcPUNzD97q7fHUfSi2hRP7F0weq Zxo//gJLYZAUVUcaqjc/X+6fAy6ImX2BM0cfOsQ+6/9VDu8eBs8Cb61cWPL805GnG/J0 XOUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GR8KXJRK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c127si3532378pfc.191.2019.06.10.10.13.30; Mon, 10 Jun 2019 10:13:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GR8KXJRK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387903AbfFJRN3 (ORCPT + 30 others); Mon, 10 Jun 2019 13:13:29 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:57916 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728556AbfFJRNU (ORCPT ); Mon, 10 Jun 2019 13:13:20 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x5AHD9vn057230; Mon, 10 Jun 2019 12:13:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1560186789; bh=65y0Cnd2F217f0FjndQy2sPV2LzXGcSYmUp9Flgkgvs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=GR8KXJRKBvhp2lPNPS8xTmEhlBQuiy4e3Loyz7HTGdIJ7ybj46XcFQjkmQIzvyrhv nN3yjQZiPuu4UqRHuq56Gn78a6s15Iw1aOMYFwzkncexdyaLpou+3qwiV8MuZhZqmR QljzPb5a9l2WL9kTMmMz5RGMtlLhqBIGAjW5/k9s= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x5AHD9bu014309 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 10 Jun 2019 12:13:09 -0500 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 10 Jun 2019 12:13:09 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Mon, 10 Jun 2019 12:13:08 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x5AHD8UR052649; Mon, 10 Jun 2019 12:13:08 -0500 From: Grygorii Strashko To: Russell King , Linus Walleij , Tony Lindgren CC: Bartosz Golaszewski , , , , Santosh Shilimkar , Russell King , Grygorii Strashko Subject: [PATCH-next 19/20] gpio: gpio-omap: irq_startup() must not return error codes Date: Mon, 10 Jun 2019 20:11:02 +0300 Message-ID: <20190610171103.30903-20-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190610171103.30903-1-grygorii.strashko@ti.com> References: <20190610171103.30903-1-grygorii.strashko@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Russell King The irq_startup() method returns an unsigned int, but in __irq_startup() it is assigned to an int. However, nothing checks for errors, so any error that is returned is ignored. Remove the check for GPIO-input mode and the error return. Signed-off-by: Russell King Signed-off-by: Grygorii Strashko --- drivers/gpio/gpio-omap.c | 5 ----- 1 file changed, 5 deletions(-) -- 2.17.1 diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 61e32c7e6670..94b10dfbff3f 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -635,8 +635,6 @@ static unsigned int omap_gpio_irq_startup(struct irq_data *d) if (!LINE_USED(bank->mod_usage, offset)) omap_set_gpio_direction(bank, offset, 1); - else if (!omap_gpio_is_input(bank, offset)) - goto err; omap_enable_gpio_module(bank, offset); bank->irq_usage |= BIT(offset); @@ -644,9 +642,6 @@ static unsigned int omap_gpio_irq_startup(struct irq_data *d) omap_gpio_unmask_irq(d); return 0; -err: - raw_spin_unlock_irqrestore(&bank->lock, flags); - return -EINVAL; } static void omap_gpio_irq_shutdown(struct irq_data *d)