Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1293480ybi; Fri, 2 Aug 2019 12:48:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxyGKj2FSn/hSFvXnatC0djNrDSWx7JB3K3AXbgIIiFTFTLmVq8YsZFg7+aK8XPnFIpsNtS X-Received: by 2002:a17:902:7288:: with SMTP id d8mr49186847pll.133.1564775327122; Fri, 02 Aug 2019 12:48:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564775327; cv=none; d=google.com; s=arc-20160816; b=qZ26Xu6w0WeMCBk5Ue2TTdiPCui5XdxbhOlJCyKL6Z7TmqIoWxl4CskGt5Xy84hXSo N+oLZjglJqligI9II/YrzFl9ELeBf56g0aQ7QKjls0m9V9+hOprQGov0TkzI4xj/s8CH aW5L0TGfh9YC0UQf+dMrfcl7ezCHneb3aeyreVqJXweGRucx+OQ/JqRyA5qb9kOVvYO5 ccslCRZYRgyz08edu2XHYQ7kiS6oz5+djygVwGSxACQheIgJJE2Nud/7WzkypjHm9FI7 oZpRRsbHJGjyTekjcCb+rwwkLJpF5GRe9BbE0u1dobsct8adnD+8w2NWylxrEVIIhIXT stew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=66d97KLhbnxovqf2V2UhWFqQ0wHq49C/lRp1B+nyJrc=; b=phjEiOrWQ6nHiUfuKhbQTlxar/mnW82xFx7gkjB5e7OMZanFhWRiNmEnudbJoT5EHk gt/XBy7ak0dZlKa0Fvi/plNrs7Vwzq6KtJMHZ0tfIrFrOBo0LhxjjAtztjapiDXeRIii 8xJ77lZoC+heXnCrWXBp//hMudQribEVhDgQppyWMBIZvZg7wI3zpMCkEOmbv2eI1z7V UNYBdNKUKIFD/KM79A0vTPWsICUnOa44cIUU2zUeD5vVaWCsb+jjidt1tt9gfHAzlfAE rm9tr77n6pvYsLOlYmw6kNUiVBlvUm0CFeNn0LwyzI4cxFxcvTS+FiXRJ5WAGrFoRDkt m9vQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a25si37861506pfo.234.2019.08.02.12.48.32; Fri, 02 Aug 2019 12:48:47 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391767AbfHBKEV convert rfc822-to-8bit (ORCPT + 99 others); Fri, 2 Aug 2019 06:04:21 -0400 Received: from skedge04.snt-world.com ([91.208.41.69]:60964 "EHLO skedge04.snt-world.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391560AbfHBKES (ORCPT ); Fri, 2 Aug 2019 06:04:18 -0400 Received: from sntmail12r.snt-is.com (unknown [10.203.32.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by skedge04.snt-world.com (Postfix) with ESMTPS id 999FD67A8D8; Fri, 2 Aug 2019 12:04:11 +0200 (CEST) Received: from sntmail12r.snt-is.com (10.203.32.182) by sntmail12r.snt-is.com (10.203.32.182) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 2 Aug 2019 12:04:11 +0200 Received: from sntmail12r.snt-is.com ([fe80::e551:8750:7bba:3305]) by sntmail12r.snt-is.com ([fe80::e551:8750:7bba:3305%3]) with mapi id 15.01.1713.004; Fri, 2 Aug 2019 12:04:11 +0200 From: Schrempf Frieder To: "u.kleine-koenig@pengutronix.de" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "linux-imx@nxp.com" CC: "linux-arm-kernel@lists.infradead.org" , "geert+renesas@glider.be" , Schrempf Frieder , Greg Kroah-Hartman , Jiri Slaby , "linux-serial@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH v3 4/4] serial: 8250: Don't check for mctrl_gpio_init() returning -ENOSYS Thread-Topic: [PATCH v3 4/4] serial: 8250: Don't check for mctrl_gpio_init() returning -ENOSYS Thread-Index: AQHVSRmhIxHe9MI46E6+p88Y1S0NjQ== Date: Fri, 2 Aug 2019 10:04:11 +0000 Message-ID: <20190802100349.8659-4-frieder.schrempf@kontron.de> References: <20190802100349.8659-1-frieder.schrempf@kontron.de> In-Reply-To: <20190802100349.8659-1-frieder.schrempf@kontron.de> Accept-Language: de-DE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.17.1 x-originating-ip: [172.25.9.193] x-c2processedorg: 51b406b7-48a2-4d03-b652-521f56ac89f3 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-SnT-MailScanner-Information: Please contact the ISP for more information X-SnT-MailScanner-ID: 999FD67A8D8.A10A8 X-SnT-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-SnT-MailScanner-SpamCheck: X-SnT-MailScanner-From: frieder.schrempf@kontron.de X-SnT-MailScanner-To: festevam@gmail.com, geert+renesas@glider.be, gregkh@linuxfoundation.org, jslaby@suse.com, kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, s.hauer@pengutronix.de, shawnguo@kernel.org, u.kleine-koenig@pengutronix.de X-Spam-Status: No Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Frieder Schrempf Now that the mctrl_gpio code returns NULL instead of ERR_PTR(-ENOSYS) if CONFIG_GPIOLIB is disabled, we can safely remove this check. Signed-off-by: Frieder Schrempf --- Changes in v3 ============= * Adjust the commit message and subject line Changes in v2 ============= * Add a patch for the 8250 driver --- drivers/tty/serial/8250/8250_core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index df3bcc0b2d74..e682390ce0de 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -1026,10 +1026,8 @@ int serial8250_register_8250_port(struct uart_8250_port *up) if (!has_acpi_companion(uart->port.dev)) { gpios = mctrl_gpio_init(&uart->port, 0); if (IS_ERR(gpios)) { - if (PTR_ERR(gpios) != -ENOSYS) { - ret = PTR_ERR(gpios); - goto out_unlock; - } + ret = PTR_ERR(gpios); + goto out_unlock; } else { uart->gpios = gpios; } -- 2.17.1