From patchwork Wed Aug 14 09:29:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 11093605 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 605056C5 for ; Wed, 14 Aug 2019 09:30:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4BF2D2871C for ; Wed, 14 Aug 2019 09:30:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3FE2828722; Wed, 14 Aug 2019 09:30:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F042E2871C for ; Wed, 14 Aug 2019 09:30:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=WTbvNL/qkhXh5jb36eqhy0zbER4GJe/tWdih+Yzt7bE=; b=tIVTPZfXRx9EyEIyu3xw+kvh1G hSrqr/jOf2epIIgvHevBB9X4LocqnTmIPx2eupfllQEAs1wjmuAFRFSXebCfzLZ8/FEKZPYZ9L55C JVvsS6SYhhr9h7zEP6Kw9rADILQEOdPqXB9PC+rLYl933uZMThnKR6qZkfraa5tsiI+dyWJ1San7j UiBUQfaeEQxOXEynzkeUjZ9nCan/PWRZKG35sqxU6n5OszJmbRmQB39ccaz/V/Y23BmAjOYD4+Bc9 5bHBCpNDz2XDL3wB1jX1yV2s0z5zCWRq7GNvbvyucu7WzMooQWR8+RdXmEArjbHbi9JkvXEmApKQO rx7Ap/Ew==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hxpbq-0005Ck-UE; Wed, 14 Aug 2019 09:30:23 +0000 Received: from xavier.telenet-ops.be ([2a02:1800:120:4::f00:14]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hxpb2-0003UJ-31 for linux-arm-kernel@lists.infradead.org; Wed, 14 Aug 2019 09:29:34 +0000 Received: from ramsan ([84.194.98.4]) by xavier.telenet-ops.be with bizsmtp id oxVS2000605gfCL01xVSWU; Wed, 14 Aug 2019 11:29:30 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1hxpaw-0003VM-3a; Wed, 14 Aug 2019 11:29:26 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1hxpaw-0003cJ-1U; Wed, 14 Aug 2019 11:29:26 +0200 From: Geert Uytterhoeven To: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH 1/3] serial: atmel: Don't check for mctrl_gpio_to_gpiod() returning error Date: Wed, 14 Aug 2019 11:29:22 +0200 Message-Id: <20190814092924.13857-2-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190814092924.13857-1-geert+renesas@glider.be> References: <20190814092757.13726-1-geert+renesas@glider.be> <20190814092924.13857-1-geert+renesas@glider.be> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190814_022932_324318_60FF9773 X-CRM114-Status: UNSURE ( 8.45 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-serial@vger.kernel.org, Geert Uytterhoeven , Richard Genoud , Shawn Guo , Sascha Hauer , Frieder Schrempf , linux-renesas-soc@vger.kernel.org, NXP Linux Team , Pengutronix Kernel Team , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Fabio Estevam , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Since commit 1d267ea6539f2663 ("serial: mctrl-gpio: simplify init routine"), mctrl_gpio_init() returns failure if the assignment to any member of the gpio array results in an error pointer. Since commit c359522194593815 ("serial: mctrl_gpio: Avoid probe failures in case of missing gpiolib"), mctrl_gpio_to_gpiod() returns NULL in the !CONFIG_GPIOLIB case. Hence there is no longer a need to check for mctrl_gpio_to_gpiod() returning an error value. A simple NULL check is sufficient. This follows the spirit of commit 445df7ff3fd1a0a9 ("serial: mctrl-gpio: drop usages of IS_ERR_OR_NULL") in the mctrl-gpio core. Signed-off-by: Geert Uytterhoeven --- drivers/tty/serial/atmel_serial.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index 19a85d6fe3d20541..e9620a81166b7dc1 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -303,32 +303,28 @@ static unsigned int atmel_get_lines_status(struct uart_port *port) mctrl_gpio_get(atmel_port->gpios, &ret); - if (!IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(atmel_port->gpios, - UART_GPIO_CTS))) { + if (mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_CTS)) { if (ret & TIOCM_CTS) status &= ~ATMEL_US_CTS; else status |= ATMEL_US_CTS; } - if (!IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(atmel_port->gpios, - UART_GPIO_DSR))) { + if (mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_DSR)) { if (ret & TIOCM_DSR) status &= ~ATMEL_US_DSR; else status |= ATMEL_US_DSR; } - if (!IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(atmel_port->gpios, - UART_GPIO_RI))) { + if (mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_RI)) { if (ret & TIOCM_RI) status &= ~ATMEL_US_RI; else status |= ATMEL_US_RI; } - if (!IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(atmel_port->gpios, - UART_GPIO_DCD))) { + if (mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_DCD)) { if (ret & TIOCM_CD) status &= ~ATMEL_US_DCD; else From patchwork Wed Aug 14 09:29:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 11093603 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8217E13B1 for ; Wed, 14 Aug 2019 09:29:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6D68128720 for ; Wed, 14 Aug 2019 09:29:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6140428726; Wed, 14 Aug 2019 09:29:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0E1DF28720 for ; Wed, 14 Aug 2019 09:29:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=lc1W/eeNbwNp4JpJHTlPZBTAt4+UnDN8cmH7CnBVZQw=; b=EFOFiGUR2xRadVSppMYKKYcRAh R3i41kYVon/WNXOPCfJCjSD8B/JV9jtuCpnO5y4+WzMlsy/0Dt5tstpPFeduJKaRp5vkhZsi0FfhK Jh4HaAF27ExiL33qmBWZ69hvRhTKtluDz8UKu6HrwENbzBok9MhWmjJCQyEyYVtBAfpNpatKckUaw T7vcQ7BNLC7mrhQXcaW0DaPUbd35CqDf1TRoLigLl3TtewlMWSXCNV9+bPoucLuCqMbTs4zvDP/yc 2nG3WGnC1nBHq8WRPcsObSOhF76qutQK8036Gw/ZdYwVDzZsxm+DOzUUW/ezMD6j9mg91aAaxVDUS 9urSe9jw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hxpb6-0003XG-AS; Wed, 14 Aug 2019 09:29:36 +0000 Received: from baptiste.telenet-ops.be ([2a02:1800:120:4::f00:13]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hxpb2-0003UE-1W for linux-arm-kernel@lists.infradead.org; Wed, 14 Aug 2019 09:29:34 +0000 Received: from ramsan ([84.194.98.4]) by baptiste.telenet-ops.be with bizsmtp id oxVS2000605gfCL01xVSG3; Wed, 14 Aug 2019 11:29:30 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1hxpaw-0003VP-4g; Wed, 14 Aug 2019 11:29:26 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1hxpaw-0003cM-38; Wed, 14 Aug 2019 11:29:26 +0200 From: Geert Uytterhoeven To: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH 2/3] serial: mxs-auart: Don't check for mctrl_gpio_to_gpiod() returning error Date: Wed, 14 Aug 2019 11:29:23 +0200 Message-Id: <20190814092924.13857-3-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190814092924.13857-1-geert+renesas@glider.be> References: <20190814092757.13726-1-geert+renesas@glider.be> <20190814092924.13857-1-geert+renesas@glider.be> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190814_022932_249596_F23B1690 X-CRM114-Status: UNSURE ( 7.91 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-serial@vger.kernel.org, Geert Uytterhoeven , Richard Genoud , Shawn Guo , Sascha Hauer , Frieder Schrempf , linux-renesas-soc@vger.kernel.org, NXP Linux Team , Pengutronix Kernel Team , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Fabio Estevam , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Since commit 1d267ea6539f2663 ("serial: mctrl-gpio: simplify init routine"), mctrl_gpio_init() returns failure if the assignment to any member of the gpio array results in an error pointer. Since commit c359522194593815 ("serial: mctrl_gpio: Avoid probe failures in case of missing gpiolib"), mctrl_gpio_to_gpiod() returns NULL in the !CONFIG_GPIOLIB case. Hence there is no longer a need to check for mctrl_gpio_to_gpiod() returning an error value. A simple NULL check is sufficient. This follows the spirit of commit 445df7ff3fd1a0a9 ("serial: mctrl-gpio: drop usages of IS_ERR_OR_NULL") in the mctrl-gpio core. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman --- drivers/tty/serial/mxs-auart.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index 4c188f4079b3ea68..e3452597068292f9 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c @@ -969,10 +969,8 @@ static int mxs_auart_dma_init(struct mxs_auart_port *s) } -#define RTS_AT_AUART() IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(s->gpios, \ - UART_GPIO_RTS)) -#define CTS_AT_AUART() IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(s->gpios, \ - UART_GPIO_CTS)) +#define RTS_AT_AUART() !mctrl_gpio_to_gpiod(s->gpios, UART_GPIO_RTS) +#define CTS_AT_AUART() !mctrl_gpio_to_gpiod(s->gpios, UART_GPIO_CTS) static void mxs_auart_settermios(struct uart_port *u, struct ktermios *termios, struct ktermios *old) From patchwork Wed Aug 14 09:29:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 11093607 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0DD0A6C5 for ; Wed, 14 Aug 2019 09:30:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDEF828675 for ; Wed, 14 Aug 2019 09:30:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD0D628683; Wed, 14 Aug 2019 09:30:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 77B2728675 for ; Wed, 14 Aug 2019 09:30:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=UTP/xuDj+CRn1q4RRwjq1iH8Ga/XUjumA3xlF2Qes4A=; b=aVB998dgfsG4DusNxGsRoEF4dE 1VhL2kgFrs0HqD/AJeeO7Hkj0NKySR3A0FCmu0RHLDCBTFXyJpj255gX/UItd9xBI8MCyUuUdfj2J +F8ghiVcHMyUi6d2ZKhB8aSVbHCy8RbrAX0lzjtKdld3aw94ZYUHTSjhgX1UYyX6BeEV365L0yW4R V9Theh3Wn8MS3bVrxc+9IN+f/1o7GZI7FXbNPH5+0u5nA7khY6SUsniLbWmvlRyS/Akg5oDnly62I CKV2ngrZ3INOCg9ixd2cpgrGcrj0bqWqOWiOvVXOL9szPkRZg0HbiIjgmFOiOv/PikLv3x7obiBlQ vnJWfWPg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hxpc7-0005QL-3W; Wed, 14 Aug 2019 09:30:39 +0000 Received: from baptiste.telenet-ops.be ([2a02:1800:120:4::f00:13]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hxpb2-0003UH-1w for linux-arm-kernel@lists.infradead.org; Wed, 14 Aug 2019 09:29:34 +0000 Received: from ramsan ([84.194.98.4]) by baptiste.telenet-ops.be with bizsmtp id oxVS2000805gfCL01xVSG4; Wed, 14 Aug 2019 11:29:30 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1hxpaw-0003VT-68; Wed, 14 Aug 2019 11:29:26 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1hxpaw-0003cQ-4F; Wed, 14 Aug 2019 11:29:26 +0200 From: Geert Uytterhoeven To: Greg Kroah-Hartman , Jiri Slaby Subject: [PATCH 3/3] serial: sh-sci: Don't check for mctrl_gpio_to_gpiod() returning error Date: Wed, 14 Aug 2019 11:29:24 +0200 Message-Id: <20190814092924.13857-4-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190814092924.13857-1-geert+renesas@glider.be> References: <20190814092757.13726-1-geert+renesas@glider.be> <20190814092924.13857-1-geert+renesas@glider.be> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190814_022932_294378_7E4246DD X-CRM114-Status: UNSURE ( 9.57 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-serial@vger.kernel.org, Geert Uytterhoeven , Richard Genoud , Shawn Guo , Sascha Hauer , Frieder Schrempf , linux-renesas-soc@vger.kernel.org, NXP Linux Team , Pengutronix Kernel Team , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Fabio Estevam , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Since commit 1d267ea6539f2663 ("serial: mctrl-gpio: simplify init routine"), mctrl_gpio_init() returns failure if the assignment to any member of the gpio array results in an error pointer. Since commit c359522194593815 ("serial: mctrl_gpio: Avoid probe failures in case of missing gpiolib"), mctrl_gpio_to_gpiod() returns NULL in the !CONFIG_GPIOLIB case. Hence there is no longer a need to check for mctrl_gpio_to_gpiod() returning an error value. A simple NULL check is sufficient. This follows the spirit of commit 445df7ff3fd1a0a9 ("serial: mctrl-gpio: drop usages of IS_ERR_OR_NULL") in the mctrl-gpio core. Signed-off-by: Geert Uytterhoeven Reviewed-by: Simon Horman --- drivers/tty/serial/sh-sci.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 7f565fcbf1ca4c5e..4e754a4850e6db63 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -2099,12 +2099,12 @@ static unsigned int sci_get_mctrl(struct uart_port *port) if (s->autorts) { if (sci_get_cts(port)) mctrl |= TIOCM_CTS; - } else if (IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(gpios, UART_GPIO_CTS))) { + } else if (!mctrl_gpio_to_gpiod(gpios, UART_GPIO_CTS)) { mctrl |= TIOCM_CTS; } - if (IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(gpios, UART_GPIO_DSR))) + if (!mctrl_gpio_to_gpiod(gpios, UART_GPIO_DSR)) mctrl |= TIOCM_DSR; - if (IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(gpios, UART_GPIO_DCD))) + if (!mctrl_gpio_to_gpiod(gpios, UART_GPIO_DCD)) mctrl |= TIOCM_CAR; return mctrl; @@ -3285,10 +3285,8 @@ static int sci_probe_single(struct platform_device *dev, return PTR_ERR(sciport->gpios); if (sciport->has_rtscts) { - if (!IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(sciport->gpios, - UART_GPIO_CTS)) || - !IS_ERR_OR_NULL(mctrl_gpio_to_gpiod(sciport->gpios, - UART_GPIO_RTS))) { + if (mctrl_gpio_to_gpiod(sciport->gpios, UART_GPIO_CTS) || + mctrl_gpio_to_gpiod(sciport->gpios, UART_GPIO_RTS)) { dev_err(&dev->dev, "Conflicting RTS/CTS config\n"); return -EINVAL; }