Re: [PATCH] tty: serial: cpm_uart: Fix behaviour for non existing GPIOs

2020-06-10 Thread Linus Walleij
Hi Christophe! On Sat, Jun 6, 2020 at 9:30 AM Christophe Leroy wrote: > gpiod = devm_gpiod_get_index(dev, NULL, i, GPIOD_ASIS); > > - if (gpiod) { > + if (!IS_ERR_OR_NULL(gpiod)) { > if (i == GPIO_RTS || i == GPIO_DTR) >

Re: [PATCH] tty: serial: cpm_uart: Fix behaviour for non existing GPIOs

2020-06-08 Thread Johan Hovold
On Sat, Jun 06, 2020 at 07:30:21AM +, Christophe Leroy wrote: > devm_gpiod_get_index() doesn't return NULL but -ENOENT when the > requested GPIO doesn't exist, leading to the following messages: > > [2.742468] gpiod_direction_input: invalid GPIO (errorpointer) > [2.748147] can't set

[PATCH] tty: serial: cpm_uart: Fix behaviour for non existing GPIOs

2020-06-06 Thread Christophe Leroy
devm_gpiod_get_index() doesn't return NULL but -ENOENT when the requested GPIO doesn't exist, leading to the following messages: [2.742468] gpiod_direction_input: invalid GPIO (errorpointer) [2.748147] can't set direction for gpio #2: -2 [2.753081] gpiod_direction_input: invalid GPIO