Commit 4256d472 authored by Javier Carrasco's avatar Javier Carrasco Committed by Dmitry Torokhov

Input: iqs269a - use device_for_each_child_node_scoped()

Switch to the _scoped() version introduced in commit 365130fd
("device property: Introduce device_for_each_child_node_scoped()")
to remove the need for manual calling of fwnode_handle_put() in the
paths where the code exits the loop early.
Signed-off-by: default avatarJavier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240412-input_device_for_each_child_node_scoped-v1-1-dbad1bc7ea84@gmail.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 3daee2e4
......@@ -811,7 +811,6 @@ static int iqs269_parse_prop(struct iqs269_private *iqs269)
{
struct iqs269_sys_reg *sys_reg = &iqs269->sys_reg;
struct i2c_client *client = iqs269->client;
struct fwnode_handle *ch_node;
u16 general, misc_a, misc_b;
unsigned int val;
int error;
......@@ -1049,13 +1048,11 @@ static int iqs269_parse_prop(struct iqs269_private *iqs269)
sys_reg->event_mask = ~((u8)IQS269_EVENT_MASK_SYS);
device_for_each_child_node(&client->dev, ch_node) {
device_for_each_child_node_scoped(&client->dev, ch_node) {
error = iqs269_parse_chan(iqs269, ch_node);
if (error) {
fwnode_handle_put(ch_node);
if (error)
return error;
}
}
/*
* Volunteer all active channels to participate in ATI when REDO-ATI is
......
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