Liang He
dd5e0e25fb
gpio: gpiolib-of: Fix refcount bugs in of_mm_gpiochip_add_data()
...
[ Upstream commit 5d07a692f9562f9c06e62cce369e9dd108173a0f ]
We should use of_node_get() when a new reference of device_node
is created. It is noted that the old reference stored in
'mm_gc->gc.of_node' should also be decreased.
This patch is based on the fact that there is a call site in function
'qe_add_gpiochips()' of src file 'drivers\soc\fsl\qe\gpio.c'. In this
function, of_mm_gpiochip_add_data() is contained in an iteration of
for_each_compatible_node() which will automatically increase and
decrease the refcount. So we need additional of_node_get() for the
reference escape in of_mm_gpiochip_add_data().
Fixes: a19e3da5bc5f ("of/gpio: Kill of_gpio_chip and add members directly to gpio_chip")
Signed-off-by: Liang He <windhl@126.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-17 15:15:36 +02:00
..
2022-02-09 13:00:45 +00:00
2022-05-14 14:56:54 +02:00
2022-05-14 14:56:58 +02:00
2022-05-14 14:57:03 +02:00
2021-12-17 17:39:35 +01:00
2021-05-21 15:29:53 +02:00
2022-06-02 09:17:38 +02:00
2022-02-02 11:53:46 +01:00
2022-01-24 17:23:15 +02:00
2021-08-12 11:39:38 +01:00
2020-12-08 09:41:32 +01:00
2020-09-28 12:22:04 +02:00
2022-04-25 12:10:02 +02:00
2021-12-17 17:50:46 +01:00
2022-01-11 12:31:35 -08:00
2021-12-10 16:14:40 +01:00
2021-08-12 11:39:38 +01:00
2021-12-17 17:44:19 +01: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
2022-04-25 12:10:02 +02:00
2020-12-08 09:41:32 +01:00
2022-04-25 12:10:02 +02:00
2021-12-17 17:44:19 +01:00
2022-06-06 14:09:16 +03:00
2020-12-12 01:37:46 +01:00
2021-05-23 20:32:09 +02:00
2021-05-21 14:45:57 +02:00
2021-12-17 17:39:35 +01:00
2022-06-06 14:09:16 +03:00
2022-06-10 14:26:15 +02:00
2021-12-17 17:39:35 +01:00
2021-12-17 17:39:35 +01:00
2022-02-02 10:16:19 +01:00
2021-08-12 11:39:38 +01:00
2020-11-25 15:36:52 +01:00
2020-05-05 18:22:26 +02:00
2022-05-16 22:16:13 +02:00
2021-12-17 17:39:35 +01:00
2022-05-14 14:57:07 +02:00
2022-06-23 16:42:27 +02:00
2021-12-22 10:05:26 +01:00
2021-08-12 11:39:38 +01:00
2022-04-25 12:10:02 +02:00
2021-05-05 16:07:41 +02:00
2022-04-25 12:10:02 +02:00
2021-05-05 16:07:41 +02:00
2022-04-25 20:53:18 +02:00
2021-05-12 13:35:39 +02:00
2022-04-25 12:10:02 +02:00
2021-05-19 13:33:49 +01:00
2021-12-17 17:44:19 +01:00
2021-10-13 19:52:26 +02:00
2022-05-05 14:37:17 +02:00
2022-02-09 13:00:45 +00:00
2021-10-13 19:52:26 +02:00
2022-02-09 13:00:45 +00:00
2022-05-05 14:56:37 +02:00
2020-05-18 09:15:16 +02:00
2022-02-09 13:00:45 +00:00
2022-04-25 12:10:02 +02:00
2022-06-06 14:09:16 +03:00
2022-05-20 19:20:35 +02:00
2022-04-25 12:10:02 +02:00
2020-07-08 09:24:08 +02:00
2020-04-28 22:41:25 +02:00
2022-04-25 12:10:02 +02:00
2021-11-19 10:38:16 +02:00
2021-04-09 14:54:23 -07:00
2022-01-20 09:05:57 +01:00
2021-12-20 16:07:22 +01:00
2022-02-09 13:36:53 +00:00
2022-05-20 16:46:56 +02:00
2021-08-12 11:39:38 +01:00
2022-06-23 23:18:13 +02:00
2022-02-09 13:36:53 +00:00
2021-12-17 17:39:35 +01:00
2022-07-19 11:20:41 +02:00
2020-07-16 14:35:12 +02:00
2022-05-24 16:35:42 +02:00
2021-12-01 15:10:26 +02:00
2021-08-12 11:39:38 +01:00
2021-08-12 11:39:38 +01:00
2022-02-09 13:00:45 +00:00
2022-04-19 15:22:26 +01:00
2021-12-17 17:39:35 +01:00
2021-12-17 17:44:19 +01:00
2021-12-17 17:39:35 +01:00
2022-05-24 16:35:49 +02:00
2021-12-22 10:05:26 +01:00
2022-06-13 18:13:36 +02:00
2021-12-23 17:14:19 +01:00
2022-04-22 22:56:46 +02:00
2021-12-17 17:39:35 +01:00
2022-06-06 14:09:16 +03:00
2022-05-24 16:35:52 +02:00
2022-07-12 13:41:25 +02:00
2020-09-09 12:59:15 +02:00
2021-02-15 11:43:26 +01:00
2021-08-12 11:39:38 +01:00
2021-05-25 16:14:34 +02:00
2021-12-17 17:39:35 +01:00
2021-12-17 12:26:13 +01:00
2021-12-17 17:39:35 +01:00
2020-08-18 21:32:28 +02:00
2022-05-02 10:41:33 +02:00
2022-04-25 12:10:02 +02:00
2021-12-17 17:39:35 +01:00
2022-06-05 09:12:28 -07:00
2022-01-24 17:23:15 +02:00
2022-02-25 09:59:35 +01:00
2021-12-17 17:50:46 +01:00
2021-12-17 17:39:35 +01:00
2021-12-17 17:50:46 +01:00
2021-05-24 20:58:46 +02:00
2022-01-24 17:23:15 +02:00
2022-02-09 13:36:54 +00:00
2022-04-01 10:26:09 -07:00
2022-03-31 16:44:57 +02:00
2021-12-17 17:50:46 +01:00
2021-11-08 11:55:21 -08:00
2022-07-05 15:58:59 +02:00
2021-08-31 11:29:28 +02:00
2022-01-14 18:50:52 -05:00
2022-05-05 14:39:02 +02:00
2022-06-21 16:50:58 +02:00
2021-02-15 11:43:29 +01:00
2021-05-27 09:51:35 +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
2021-05-25 16:21:28 +02:00
2021-05-25 16:21:14 +02:00
2022-05-14 14:57:12 +02:00
2020-05-18 09:16:31 +02:00
2021-05-23 20:30:26 +02:00
2021-10-25 10:10:37 +02:00
2022-07-22 09:17:03 +02:00
2021-12-03 16:00:40 +01:00
2020-11-30 17:36:36 +01:00
2022-05-14 14:41:21 +02:00
2021-08-12 11:39:38 +01:00
2021-09-23 10:09:58 +02:00
2022-04-08 15:13:22 +03:00
2021-03-26 14:56:18 +01:00
2022-07-18 11:47:04 -07:00
2020-11-05 15:35:40 +01:00
2021-08-05 21:21:58 +02:00
2022-08-17 15:15:36 +02:00
2021-01-27 16:04:10 +01:00
2022-04-09 22:37:48 +02:00
2020-07-12 10:22:00 +02:00
2022-06-05 09:12:28 -07:00
2022-06-05 09:12:28 -07:00
2022-05-02 14:12:30 +02:00
2022-03-28 12:27:35 -07:00
2022-04-19 15:22:26 +01:00