summaryrefslogtreecommitdiff
path: root/drivers/input/keyboard
diff options
context:
space:
mode:
authorRob Herring (Arm) <robh@kernel.org>2024-07-31 13:12:52 -0600
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2024-07-31 12:36:49 -0700
commit8bd2aa8529aca1f39bc2bfac4f68adc47c6bd1d7 (patch)
tree9823e42df6ee23e578226c740ea33d10b185cb6d /drivers/input/keyboard
parent3fe81a56253b25864f15b699609e26c0ccdd9180 (diff)
downloadlwn-8bd2aa8529aca1f39bc2bfac4f68adc47c6bd1d7.tar.gz
lwn-8bd2aa8529aca1f39bc2bfac4f68adc47c6bd1d7.zip
Input: tc3589x - use of_property_present()
Use of_property_present() to test for property presence rather than of_get_property(). This is part of a larger effort to remove callers of of_get_property() and similar functions. of_get_property() leaks the DT property data pointer which is a problem for dynamically allocated nodes which may be freed. Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20240731191312.1710417-14-robh@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r--drivers/input/keyboard/tc3589x-keypad.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/input/keyboard/tc3589x-keypad.c b/drivers/input/keyboard/tc3589x-keypad.c
index b0d86621c60a..11988cffdfae 100644
--- a/drivers/input/keyboard/tc3589x-keypad.c
+++ b/drivers/input/keyboard/tc3589x-keypad.c
@@ -325,7 +325,6 @@ tc3589x_keypad_of_probe(struct device *dev)
struct tc3589x_keypad_platform_data *plat;
u32 cols, rows;
u32 debounce_ms;
- int proplen;
if (!np)
return ERR_PTR(-ENODEV);
@@ -346,7 +345,7 @@ tc3589x_keypad_of_probe(struct device *dev)
return ERR_PTR(-EINVAL);
}
- if (!of_get_property(np, "linux,keymap", &proplen)) {
+ if (!of_property_present(np, "linux,keymap")) {
dev_err(dev, "property linux,keymap not found\n");
return ERR_PTR(-ENOENT);
}