[PATCH 09/26] Input: maple_keyb - remove redundant drvdata resetting
Dmitry Torokhov
dmitry.torokhov at gmail.com
Fri Jul 3 22:57:32 PDT 2026
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 <dmitry.torokhov at gmail.com>
---
drivers/input/keyboard/maple_keyb.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/input/keyboard/maple_keyb.c b/drivers/input/keyboard/maple_keyb.c
index a245774acc55..0c92138bcc77 100644
--- a/drivers/input/keyboard/maple_keyb.c
+++ b/drivers/input/keyboard/maple_keyb.c
@@ -212,7 +212,6 @@ static int probe_maple_kbd(struct device *dev)
return error;
fail_register:
- maple_set_drvdata(mdev, NULL);
input_free_device(idev);
fail_idev_alloc:
kfree(kbd);
@@ -230,7 +229,6 @@ static int remove_maple_kbd(struct device *dev)
input_unregister_device(kbd->dev);
kfree(kbd);
- maple_set_drvdata(mdev, NULL);
return 0;
}
--
2.55.0.rc0.799.gd6f94ed593-goog
More information about the linux-mtd
mailing list