From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751882AbdCCO3m (ORCPT ); Fri, 3 Mar 2017 09:29:42 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35484 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751415AbdCCO3j (ORCPT ); Fri, 3 Mar 2017 09:29:39 -0500 From: Richard Genoud To: Greg Kroah-Hartman Cc: Janusz Uzycki , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Nicolas Ferre , Boris Brezillon , linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Genoud Subject: [PATCH 3/4] tty/serial: mxs-auart: remove uneeded IS_ERR_OR_NULL calls Date: Fri, 3 Mar 2017 15:20:31 +0100 Message-Id: <20170303142031.16101-1-richard.genoud@gmail.com> X-Mailer: git-send-email 2.11.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 1d267ea6539f ("serial: mctrl-gpio: simplify init routine"), the mctrl_gpio_to_gpiod() function can't return an error anymore. So, just testing for a NULL pointer is ok. Signed-off-by: Richard Genoud --- 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 6989b227d134..541933d8a5c6 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c @@ -973,10 +973,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) == NULL) +#define CTS_AT_AUART() (mctrl_gpio_to_gpiod(s->gpios, UART_GPIO_CTS) == NULL) static void mxs_auart_settermios(struct uart_port *u, struct ktermios *termios, struct ktermios *old)