]> www.infradead.org Git - users/jedix/linux-maple.git/commit
gpio: acpi: switch to device_for_each_child_node_scoped()
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Sat, 28 Sep 2024 19:47:37 +0000 (21:47 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 30 Sep 2024 11:25:54 +0000 (14:25 +0300)
commit12b0e305f50988b0c75f052f86d51b5353108ca5
tree29a17e5d8c5bfa09c6146f1b145199b4aff31557
parent9852d85ec9d492ebef56dc5f229416c925758edc
gpio: acpi: switch to device_for_each_child_node_scoped()

Switch to device_for_each_child_node_scoped() to simplify the code by
removing the need for a call to fwnode_handle_put() in the error path.

This also prevents possible memory leaks if new error paths are added
without the required call to fwnode_handle_put().

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/gpio/gpiolib-acpi.c