Boerge Struempfel
95dd1e34ff
gpiolib: sysfs: Fix error handling on failed export
...
If gpio_set_transitory() fails, we should free the GPIO again. Most
notably, the flag FLAG_REQUESTED has previously been set in
gpiod_request_commit(), and should be reset on failure.
To my knowledge, this does not affect any current users, since the
gpio_set_transitory() mainly returns 0 and -ENOTSUPP, which is converted
to 0. However the gpio_set_transitory() function calles the .set_config()
function of the corresponding GPIO chip and there are some GPIO drivers in
which some (unlikely) branches return other values like -EPROBE_DEFER,
and -EINVAL. In these cases, the above mentioned FLAG_REQUESTED would not
be reset, which results in the pin being blocked until the next reboot.
Fixes: e10f72bf4b3e ("gpio: gpiolib: Generalise state persistence beyond sleep")
Signed-off-by: Boerge Struempfel <boerge.struempfel@gmail.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-12-01 10:44:48 +01:00
..
2022-02-09 13:00:45 +00:00
2023-07-29 16:03:17 +02:00
2023-07-27 09:37:33 +02:00
2023-04-11 21:08:31 +02:00
2023-08-11 14:23:29 +02:00
2023-05-23 10:09:11 +02:00
2021-05-21 15:29:53 +02:00
2023-06-16 11:02:07 +02:00
2023-08-03 15:58:45 +02:00
2023-10-02 08:53:57 +02:00
2022-11-30 17:18:35 +01:00
2020-09-28 12:22:04 +02:00
2023-10-02 08:54:09 +02:00
2022-10-19 17:03:55 +03:00
2023-03-10 16:17:20 +01:00
2023-11-04 10:23:22 +01:00
2023-07-19 13:24:01 +02:00
2023-07-19 13:26:22 +02:00
2021-05-21 15:43:26 +02:00
2021-04-14 10:19:22 +01:00
2021-12-17 17:39:35 +01:00
2023-10-02 08:54:20 +02:00
2020-12-08 09:41:32 +01:00
2023-10-02 08:54:26 +02:00
2023-08-03 15:58:46 +02:00
2023-07-19 13:24:01 +02:00
2022-06-06 14:09:16 +03:00
2020-12-12 01:37:46 +01:00
2022-10-19 17:03:55 +03:00
2021-05-21 14:45:57 +02:00
2023-10-09 09:08:08 +02:00
2023-10-02 08:54:31 +02:00
2023-07-29 15:56:33 +02:00
2023-09-11 11:17:06 +02:00
2023-09-13 14:13:32 +02:00
2023-03-06 17:10:46 +02:00
2023-11-04 10:23:23 +01:00
2022-02-02 10:16:19 +01:00
2023-01-27 14:05:38 +01:00
2023-07-29 16:04:38 +02:00
2023-09-11 09:03:44 +02:00
2023-10-02 08:54:36 +02:00
2023-10-02 08:58:01 +02:00
2023-07-27 09:33:07 +02:00
2023-01-30 15:55:28 +01:00
2023-10-02 08:54:41 +02:00
2023-05-23 10:09:11 +02:00
2023-10-13 08:39:30 +02:00
2023-07-19 13:24:01 +02:00
2023-01-30 15:55:28 +01:00
2023-01-30 15:55:28 +01:00
2023-03-09 16:08:39 +02:00
2023-08-11 14:23:32 +02:00
2023-08-11 14:23:32 +02:00
2023-03-10 16:17:30 +01:00
2023-08-11 16:20:02 +02:00
2021-05-05 16:07:41 +02:00
2023-08-03 15:58:48 +02:00
2022-10-26 14:52:01 +02:00
2023-10-11 11:33:38 +02:00
2023-07-29 16:05:50 +02:00
2023-03-23 14:31:18 +01:00
2023-09-27 09:06:50 +02:00
2022-06-10 14:51:36 +02:00
2023-08-01 21:14:48 +02:00
2022-06-10 14:51:36 +02:00
2023-10-02 08:54:50 +02:00
2023-08-03 15:58:49 +02:00
2021-10-13 19:52:26 +02:00
2023-08-03 15:56:30 +02:00
2023-08-03 15:58:50 +02:00
2023-05-23 10:09:11 +02:00
2022-02-09 13:00:45 +00:00
2023-08-01 21:15:23 +02:00
2023-10-02 08:54:55 +02:00
2022-02-09 13:00:45 +00:00
2022-04-25 12:10:02 +02:00
2023-03-06 17:10:46 +02:00
2022-05-20 19:20:35 +02:00
2023-03-10 16:17:32 +01:00
2023-08-24 10:04:04 +02:00
2020-07-08 09:24:08 +02:00
2023-10-02 08:55:00 +02:00
2023-10-09 09:08:08 +02:00
2023-09-11 11:17:02 +02:00
2021-04-09 14:54:23 -07:00
2023-10-02 08:55:09 +02:00
2023-10-02 08:55:04 +02:00
2023-07-19 13:24:01 +02:00
2022-10-08 09:46:29 -07:00
2023-11-09 13:47:52 -08:00
2023-08-21 14:11:16 +02:00
2023-08-11 16:21:46 +02:00
2023-10-04 11:37:25 +02:00
2023-08-01 21:22:38 +02:00
2023-10-02 08:57:48 +02:00
2023-08-21 10:39:58 +02:00
2023-08-22 11:41:17 +02:00
2022-06-21 18:01:11 +03:00
2023-08-11 14:23:31 +02:00
2023-08-11 14:23:33 +02:00
2023-07-20 17:22:10 +02:00
2022-10-24 12:29:26 +03:00
2023-09-27 09:12:09 +02:00
2023-11-04 10:23:22 +01:00
2023-08-03 15:58:52 +02:00
2023-08-01 21:26:48 +02:00
2023-11-04 10:23:21 +01:00
2023-03-23 14:31:18 +01:00
2022-08-31 17:46:30 +02:00
2023-03-06 12:33:02 +02:00
2023-03-06 12:33:02 +02:00
2023-11-04 10:23:22 +01:00
2023-05-17 11:56:24 +02:00
2023-08-01 21:27:38 +02:00
2023-05-17 11:52:14 +02:00
2023-08-03 15:44:46 +02:00
2023-07-25 12:00:42 +02:00
2023-10-31 17:21:54 -10:00
2023-03-23 14:31:18 +01:00
2022-11-15 15:41:45 +01:00
2021-08-12 11:39:38 +01:00
2022-06-10 14:51:35 +02:00
2023-07-19 13:24:01 +02:00
2023-03-23 14:31:18 +01:00
2023-07-19 13:24:01 +02:00
2023-08-03 15:44:49 +02:00
2023-05-23 10:22:25 +02:00
2023-03-06 17:10:46 +02:00
2023-10-31 17:21:54 -10:00
2022-10-03 20:56:46 +02:00
2023-07-19 13:24:01 +02:00
2023-11-04 10:23:23 +01:00
2023-03-23 14:31:18 +01:00
2023-09-27 08:51:28 +02:00
2022-02-25 09:59:35 +01:00
2023-05-23 10:09:11 +02:00
2023-07-19 13:24:01 +02:00
2023-05-17 11:40:40 +02:00
2023-08-03 15:55:34 +02:00
2023-06-13 14:49:56 +02:00
2023-07-19 13:24:01 +02:00
2021-05-24 20:58:46 +02:00
2023-07-19 13:22:13 +02:00
2023-08-03 15:47:58 +02:00
2023-07-19 13:24:01 +02:00
2023-07-19 13:24:01 +02:00
2023-10-02 08:55:27 +02:00
2023-05-31 17:01:34 +02:00
2021-12-17 17:50:46 +01:00
2023-10-02 08:55:32 +02:00
2023-11-04 10:23:22 +01:00
2021-08-31 11:29:28 +02:00
2022-01-14 18:50:52 -05:00
2023-03-23 14:31:18 +01:00
2023-08-03 15:48:15 +02:00
2023-07-19 13:24:01 +02:00
2022-06-06 14:09:16 +03:00
2022-06-23 16:29:55 +02:00
2021-12-17 17:50:46 +01:00
2022-10-24 12:29:41 +03:00
2021-05-25 16:21:14 +02:00
2023-08-29 10:21:56 -07:00
2023-10-02 08:55:38 +02:00
2021-05-23 20:30:26 +02:00
2023-10-02 08:55:42 +02:00
2023-10-02 08:55:46 +02:00
2023-03-23 14:31:19 +01:00
2023-08-03 15:58:54 +02:00
2023-08-03 15:48:27 +02:00
2023-10-02 08:55:50 +02:00
2021-09-23 10:09:58 +02:00
2023-10-31 17:21:54 -10:00
2023-03-06 12:33:02 +02:00
2023-11-04 10:23:21 +01:00
2020-11-05 15:35:40 +01:00
2023-01-30 15:55:28 +01:00
2023-06-01 09:52:39 +02:00
2023-11-02 14:34:14 -10:00
2023-03-06 12:33:02 +02:00
2023-10-04 13:36:23 +02:00
2022-11-15 11:21:43 +01:00
2023-12-01 10:44:48 +01:00
2022-10-24 12:30:26 +03:00
2023-11-04 10:23:22 +01:00
2023-10-04 13:28:58 +02:00
2023-11-03 16:00:42 -10:00
2023-07-29 15:56:33 +02:00
2023-03-06 12:33:01 +02:00