Commit 6df6ea4
gpiolib: clear requested flag if line is invalid
If `gpiochip_line_is_valid()` fails, then `-EINVAL` is returned, but
`desc->flags` will have `GPIOD_FLAG_REQUESTED` set, which will result
in subsequent calls misleadingly returning `-EBUSY`.
Fix that by clearing the flag in case of failure.
Fixes: a501624 ("gpio: Respect valid_mask when requesting GPIOs")
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://patch.msgid.link/20260310204359.1202451-1-pobrn@protonmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>1 parent 189645b commit 6df6ea4
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2465 | 2465 | | |
2466 | 2466 | | |
2467 | 2467 | | |
2468 | | - | |
2469 | | - | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
2470 | 2472 | | |
2471 | 2473 | | |
2472 | 2474 | | |
| |||
0 commit comments