mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
ACPI / gpio: add missing fwnode_handle_put() in acpi_gpiochip_scan_gpios()
fwnode_handle_put() should be used when terminating device_for_each_child_node() iteration with break or return to prevent stale device node references from being left behind. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
5a195c6d4e
commit
1b6998c96c
1 changed files with 1 additions and 0 deletions
|
|
@ -922,6 +922,7 @@ static void acpi_gpiochip_scan_gpios(struct acpi_gpio_chip *achip)
|
|||
ret = gpiod_hog(desc, name, lflags, dflags);
|
||||
if (ret) {
|
||||
dev_err(chip->parent, "Failed to hog GPIO\n");
|
||||
fwnode_handle_put(fwnode);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue