Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7675934ybi; Thu, 1 Aug 2019 11:56:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyg6COtfkZ/IiJSz+5YkPNTiDyxo3F9CdAOqQADO0RetBheUNFQUsSWDpbkbnjVYkLLXf3w X-Received: by 2002:a17:90a:1b0c:: with SMTP id q12mr275055pjq.76.1564685777606; Thu, 01 Aug 2019 11:56:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564685777; cv=none; d=google.com; s=arc-20160816; b=q8ESIs/spvkgq0Z9c5yHCxiax6YXToJ0MuBiZWY/+Wzl0X1QSZiAt6DyjYpQxx4ift Twgqd8xfQUpSB+CZnJ7fikMhgHb2jAfnR1zz8SBnrmgI0CINCZ0lostPHCJqpqQCRO20 jYWEFlq7Plt86Bm0ybYYUDU9v+7bcK4fM4Lyr8aqtBfElNeAwBQZ96I0hpTokL2TLwYo MvTsPqoWeeq1fmqpr7KVIkN6Tp1EaDfWYIzpLO4F2ZoMPPgp9XP4WB3ZU9N40kXzPz5B 7YouDoxEHRK7Y5j6PywAFMrYKSz2e2mYzBa5yxBvyjb0echPLl7mrSq4b08/LzAKbSDU XV/A== 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=gTBEgLF/Ou8Kwf31fB38H+illAkE5ahrtfaRGPxBWkk=; b=rxTUEZ4yKHye8VGZVQgieVZSCNNBDoPr+Y1OemZhd9e77FyMkwEbQ9+xklkyfVra/+ wM0Uoe5QY3RTX+L2oN/B8hkicvnAzQDWDCUq685w6WreiGhll7wZNsLVAxke72GkJk6n tCTFkQQhATD687qHk9kkPda8OiA+Q2vuhDs7irJAY4cuL7dXR008hf/c2laPDWed7+Ib +TgCzi46plUWfDFIu12f69KiY0YaiSsVdWPeI/3A+lFtfdK1CV2L8DH6fXlvUr5Ccszv rOObVhRJhgeT92ChNsX4izt7MRG9kipzlV9WA2WWvKg4dc/yqFmGgNTrUIwAGnGJY/pg X7mA== 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 91si37320084plb.39.2019.08.01.11.56.02; Thu, 01 Aug 2019 11:56:17 -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 S1733266AbfHASpg convert rfc822-to-8bit (ORCPT + 99 others); Thu, 1 Aug 2019 14:45:36 -0400 Received: from skedge03.snt-world.com ([91.208.41.68]:40398 "EHLO skedge03.snt-world.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726017AbfHASpf (ORCPT ); Thu, 1 Aug 2019 14:45:35 -0400 Received: from sntmail14r.snt-is.com (unknown [10.203.32.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by skedge03.snt-world.com (Postfix) with ESMTPS id 089816274C3; Thu, 1 Aug 2019 20:45:33 +0200 (CEST) Received: from sntmail12r.snt-is.com (10.203.32.182) by sntmail14r.snt-is.com (10.203.32.184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 1 Aug 2019 20:45:32 +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; Thu, 1 Aug 2019 20:45:32 +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 v2 3/3] serial: 8250: Remove check for specific mctrl_gpio_init() return value Thread-Topic: [PATCH v2 3/3] serial: 8250: Remove check for specific mctrl_gpio_init() return value Thread-Index: AQHVSJlMYOgwSyf98EmjTVkXuG4aig== Date: Thu, 1 Aug 2019 18:45:32 +0000 Message-ID: <20190801184505.17239-3-frieder.schrempf@kontron.de> References: <20190801184505.17239-1-frieder.schrempf@kontron.de> In-Reply-To: <20190801184505.17239-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: 089816274C3.AFA37 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) in cases when CONFIG_GPIOLIB is disabled, we can safely remove this check. Signed-off-by: Frieder Schrempf --- 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