Skip to content

Commit e336d85

Browse files
jlabundydtor
authored andcommitted
Input: iqs62x-keys - drop unused device node references
Each call to device/fwnode_get_named_child_node() must be matched with a call to fwnode_handle_put() once the corresponding node is no longer in use. This ensures a reference count remains balanced in the case of dynamic device tree support. Currently, the driver never calls fwnode_handle_put(). This patch adds the missing calls. Fixes: ce1cb0e ("input: keyboard: Add support for Azoteq IQS620A/621/622/624/625") Signed-off-by: Jeff LaBundy <jeff@labundy.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Link: https://lore.kernel.org/r/YyYbYvlkq5cy55dc@nixie71 Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent a54dc27 commit e336d85

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/input/keyboard/iqs62x-keys.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ static int iqs62x_keys_parse_prop(struct platform_device *pdev,
7777
if (ret) {
7878
dev_err(&pdev->dev, "Failed to read switch code: %d\n",
7979
ret);
80+
fwnode_handle_put(child);
8081
return ret;
8182
}
8283
iqs62x_keys->switches[i].code = val;
@@ -90,6 +91,8 @@ static int iqs62x_keys_parse_prop(struct platform_device *pdev,
9091
iqs62x_keys->switches[i].flag = (i == IQS62X_SW_HALL_N ?
9192
IQS62X_EVENT_HALL_N_T :
9293
IQS62X_EVENT_HALL_S_T);
94+
95+
fwnode_handle_put(child);
9396
}
9497

9598
return 0;

0 commit comments

Comments
 (0)