Liang He
a7af678e76
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-25 11:11:22 +02:00
..
2017-08-14 15:01:13 +02:00
2018-02-25 11:07:56 +01:00
2017-05-10 19:13:03 -07:00
2017-05-10 19:13:03 -07:00
2017-05-10 19:13:03 -07:00
2019-04-03 06:25:19 +02:00
2018-10-10 08:54:19 +02:00
2019-02-06 17:31:35 +01:00
2017-08-14 15:01:12 +02:00
2020-07-29 07:42:51 +02:00
2019-05-04 09:15:21 +02:00
2018-02-03 17:38:52 +01:00
2017-03-16 21:52:07 +01:00
2017-04-28 09:47:46 +02:00
2018-11-21 09:24:17 +01:00
2017-05-23 10:02:01 +02:00
2018-02-25 11:07:56 +01:00
2017-01-26 15:27:37 +01:00
2017-06-21 09:36:46 +02:00
2017-01-26 15:27:37 +01:00
2017-11-02 11:10:55 +01:00
2020-06-03 08:17:59 +02:00
2017-04-28 10:09:16 +02:00
2017-11-02 11:10:55 +01:00
2017-08-14 15:01:12 +02:00
2017-04-20 12:02:32 +01:00
2020-02-28 16:35:56 +01:00
2017-05-22 17:18:19 +02:00
2017-01-26 10:00:20 +01:00
2018-02-03 17:38:52 +01:00
2017-08-14 15:03:38 +02:00
2017-01-26 15:27:37 +01:00
2017-07-31 15:26:57 +02:00
2017-05-23 11:33:59 +02:00
2018-12-29 13:39:09 +01:00
2019-12-01 09:13:12 +01:00
2017-08-14 15:03:38 +02:00
2018-10-03 17:00:53 -07:00
2017-06-16 11:13:11 +02:00
2018-09-19 22:43:42 +02:00
2016-12-30 09:18:10 +01:00
2017-03-23 09:49:06 +01:00
2020-11-22 10:00:24 +01:00
2020-01-17 19:45:53 +01:00
2017-08-14 15:03:38 +02:00
2022-05-25 08:41:21 +02:00
2017-08-21 00:09:33 +02:00
2018-11-10 07:48:34 -08:00
2019-07-31 07:28:25 +02:00
2017-08-14 15:01:12 +02:00
2021-03-03 18:22:55 +01:00
2017-08-21 00:08:52 +02:00
2017-03-28 11:13:59 +02:00
2019-01-26 09:37:01 +01:00
2019-04-20 09:15:04 +02:00
2017-08-14 15:01:12 +02:00
2017-03-24 14:05:00 +01:00
2017-03-24 14:04:37 +01:00
2017-03-15 11:16:36 +01:00
2017-08-21 00:06:04 +02:00
2018-02-03 17:38:48 +01:00
2016-12-30 09:18:10 +01:00
2019-11-24 08:23:27 +01:00
2017-08-14 15:01:12 +02:00
2020-10-14 09:51:06 +02:00
2020-06-03 08:17:48 +02:00
2018-04-12 12:32:20 +02:00
2017-01-26 15:27:37 +01:00
2017-08-14 15:37:38 +02:00
2022-03-16 12:57:07 +01:00
2017-09-04 14:41:02 +01:00
2017-08-23 10:20:16 +02:00
2017-08-14 15:01:12 +02:00
2022-05-25 08:41:21 +02:00
2022-07-02 16:18:08 +02:00
2017-01-26 15:27:37 +01:00
2017-07-07 13:30:05 -07:00
2017-03-23 11:45:55 +00:00
2017-01-26 15:27:37 +01:00
2017-05-10 19:13:03 -07:00
2017-03-06 14:35:22 +01:00
2017-08-14 15:01:12 +02:00
2017-03-16 21:52:10 +01:00
2017-05-22 17:48:41 +02:00
2017-08-23 09:21:54 +02:00
2017-03-16 21:52:10 +01:00
2021-07-20 16:17:50 +02:00
2022-04-20 09:08:31 +02:00
2018-01-02 20:31:04 +01:00
2022-08-25 11:11:22 +02:00
2017-09-05 11:49:48 -07:00
2020-04-24 08:01:02 +02:00
2018-09-26 08:38:12 +02:00
2020-02-05 14:18:07 +00:00
2017-11-02 11:10:55 +01:00