Input: maplemouse - 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-8-41e424964da5@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
Dmitry Torokhov 2026-07-03 22:57:31 -07:00
parent 988e3ddd59
commit c7e04ad2a2

View File

@ -109,7 +109,6 @@ static int probe_maple_mouse(struct device *dev)
fail_register:
input_free_device(input_dev);
maple_set_drvdata(mdev, NULL);
fail_nomem:
kfree(mse);
fail:
@ -122,7 +121,6 @@ static int remove_maple_mouse(struct device *dev)
struct dc_mouse *mse = maple_get_drvdata(mdev);
input_unregister_device(mse->dev);
maple_set_drvdata(mdev, NULL);
kfree(mse);
return 0;