From d4db324ecdc6b5372c4dc34bd0b8a5ac8d5cb38c Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Fri, 3 Jul 2026 22:57:33 -0700 Subject: [PATCH] Input: maplecontrol - remove redundant drvdata resetting 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 Link: https://patch.msgid.link/20260703-b4-maple-cleanup-v1-10-41e424964da5@gmail.com Signed-off-by: Dmitry Torokhov --- 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 19ae238e6c00..cc17a952833a 100644 --- a/drivers/input/joystick/maplecontrol.c +++ b/drivers/input/joystick/maplecontrol.c @@ -148,7 +148,6 @@ static int probe_maple_controller(struct device *dev) fail: input_free_device(idev); kfree(pad); - maple_set_drvdata(mdev, NULL); return error; } @@ -158,7 +157,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;