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)
>
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
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
3 matches
Mail list logo