Commit db6aee60 authored by Liang He's avatar Liang He Committed by Wolfram Sang

i2c: mux: gpio: Add missing fwnode_handle_put()

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: 98b2b712 ("i2c: i2c-mux-gpio: Enable this driver in ACPI land")
Signed-off-by: default avatarLiang He <windhl@126.com>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 7c0195fa
......@@ -105,8 +105,10 @@ 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++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment