Liang He 5d07a692f9 gpio: gpiolib-of: Fix refcount bugs in of_mm_gpiochip_add_data()
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>
2022-07-19 09:57:41 +02:00
..
2022-07-15 10:12:22 -07:00
2022-06-30 08:21:43 +09:00
2022-06-26 14:12:56 -07:00
2022-05-15 18:31:28 -06:00
2022-07-15 13:54:14 +02:00
2022-07-15 10:12:22 -07:00
2022-07-17 13:08:03 -07:00
2022-07-17 07:52:46 -07:00
2022-06-02 15:23:54 -07:00
2022-05-25 16:18:27 -07:00
2022-05-25 15:02:26 +02:00
2022-06-03 11:48:47 -07:00
2022-06-02 15:23:54 -07:00
2022-05-23 21:06:11 -07:00
2022-05-19 16:56:17 +02:00
2022-07-15 10:12:22 -07:00
2022-05-09 23:09:10 +02:00
2022-06-03 11:48:47 -07:00
2022-06-02 15:23:54 -07:00
2022-07-16 11:00:40 -07:00
2022-06-03 11:48:47 -07:00
2022-05-11 08:29:11 +03:00
2022-07-14 16:22:12 +02:00
2022-06-05 09:25:12 -07:00
2022-06-05 09:25:12 -07:00