mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
i2c: mux: gpio: Add missing fwnode_handle_put()
[ Upstream commitdb6aee6083
] In i2c_mux_gpio_probe_fw(), we should add fwnode_handle_put() when break out of the iteration device_for_each_child_node() as it will automatically increase and decrease the refcounter. Fixes:98b2b712bc
("i2c: i2c-mux-gpio: Enable this driver in ACPI land") Signed-off-by: Liang He <windhl@126.com> Signed-off-by: Wolfram Sang <wsa@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
976c8c1c40
commit
fb9cfb28bd
1 changed files with 3 additions and 1 deletions
|
@ -105,9 +105,11 @@ static int i2c_mux_gpio_probe_fw(struct gpiomux *mux,
|
|||
|
||||
} else if (is_acpi_node(child)) {
|
||||
rc = acpi_get_local_address(ACPI_HANDLE_FWNODE(child), values + i);
|
||||
if (rc)
|
||||
if (rc) {
|
||||
fwnode_handle_put(child);
|
||||
return dev_err_probe(dev, rc, "Cannot get address\n");
|
||||
}
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue