Message ID | 20210811105136.25392-1-tangbin@cmss.chinamobile.com |
---|---|
State | New |
Headers | show |
Series | serial: stm32: fix the conditional expression writing | expand |
diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c index ef793b3b4..090822cd1 100644 --- a/drivers/tty/serial/stm32-usart.c +++ b/drivers/tty/serial/stm32-usart.c @@ -1034,8 +1034,8 @@ static int stm32_usart_init_port(struct stm32_port *stm32port, int ret, irq; irq = platform_get_irq(pdev, 0); - if (irq <= 0) - return irq ? : -ENODEV; + if (irq < 0) + return irq; port->iotype = UPIO_MEM; port->flags = UPF_BOOT_AUTOCONF;