[PATCH 10/26] Input: maplecontrol - remove redundant drvdata resetting
Dmitry Torokhov <[email protected]> Fri, 03 Jul 2026 22:57:33 -0700
| Newsgroups | org.kernel.vger.linux-sh,org.infradead.lists.linux-mtd,org.kernel.vger.linux-input,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
The driver core automatically resets driver data to NULL on probe failures and device removal, so we can remove it from the driver. Assisted-by: Antigravity:gemini-3.5-flash Signed-off-by: Dmitry Torokhov <[email protected]> --- drivers/input/joystick/maplecontrol.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/input/joystick/maplecontrol.c b/drivers/input/joystick/maplecontrol.c index 9d623c9e8f22..79cec89ad52a 100644 --- a/drivers/input/joystick/maplecontrol.c +++ b/drivers/input/joystick/maplecontrol.c @@ -146,7 +146,6 @@ static int probe_maple_controller(struct device *dev) fail: input_free_device(idev); kfree(pad); - maple_set_drvdata(mdev, NULL); return error; } @@ -156,7 +155,6 @@ static int remove_maple_controller(struct device *dev) struct dc_pad *pad = maple_get_drvdata(mdev); input_unregister_device(pad->dev); - maple_set_drvdata(mdev, NULL); kfree(pad); return 0; -- 2.55.0.rc0.799.gd6f94ed593-goog