summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2026-10-08 02:47:32 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2026-10-14 10:21:06 -0700
commit7e55dbd5404194ef1ab961ec56e7a7f182c03bd2 (patch)
tree5967d49950006939aeff99c26b2f5ef5ebc21b4f /drivers/input
parent6d1f1ec9174c27b0dc9d5b4ea0cc05c9033ac7ef (diff)
Input: drv2665 - fix input device parent assignment
Assigning the I2C bus controller (client->dev.parent) instead of the I2C client (&client->dev) as the parent device after devm_input_allocate_device() causes input_register_device() to attach the devm unregistration action to the parent controller device rather than the client device. This leaves the input device registered on driver unbind, leading to use-after-free. devm_input_allocate_device() already sets input_dev->dev.parent to &client->dev. Drop the redundant and erroneous assignment. Fixes: 4d10da13467e ("Input: add TI drv2665 haptics driver") Assisted-by: LLM Link: https://patch.msgid.link/20261008094736.918137-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/misc/drv2665.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/input/misc/drv2665.c b/drivers/input/misc/drv2665.c
index 4f8c1f69aa63..134d65fdcf2d 100644
--- a/drivers/input/misc/drv2665.c
+++ b/drivers/input/misc/drv2665.c
@@ -180,7 +180,6 @@ static int drv2665_probe(struct i2c_client *client)
}
haptics->input_dev->name = "drv2665:haptics";
- haptics->input_dev->dev.parent = client->dev.parent;
haptics->input_dev->close = drv2665_close;
input_set_drvdata(haptics->input_dev, haptics);
input_set_capability(haptics->input_dev, EV_FF, FF_RUMBLE);