]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Input: 88pm860x - use cleanup facility for device_node
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Sun, 20 Oct 2024 04:14:57 +0000 (21:14 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 20 Oct 2024 04:21:41 +0000 (21:21 -0700)
commit8dee1ddafa2f66c32d14af8e138e70ae7ace0292
tree9f7c3209b83a7278c8894d76d84d5f53dfd21486
parentd3dcadd654aefadebe847da74059dce6cc506e6b
Input: 88pm860x - use cleanup facility for device_node

Use the '__free(device_node)' macro to simplify the code and error
handling. This makes the code more robust by ensuring that the device
node is always freed.

Drop the first assignment to 'pdev->dev.parent->of_node', as it was only
a shortcut, and tie 'np' to its usage as a child node.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20241010-input_automate_of_node_put-v1-7-ebc62138fbf8@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/88pm860x-ts.c