Re: [PATCH 10/26] Input: maplecontrol - remove redundant drvdata resetting
From: sashiko-bot@kernel.org
Date: 2026-07-04 06:09:04
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: Pre-existing issues: - [Medium] Missing `input_sync()` in the event reporting callback, causing events to not be flushed to userspace. -- commit 049ef41ae581c4ec81e962190335026e0500fa08 Author: Dmitry Torokhov [off-list ref] Input: maplecontrol - remove redundant drvdata resetting This patch removes redundant maple_set_drvdata(mdev, NULL) calls from the probe error paths and device removal functions. The driver core automatically resets driver data to NULL on probe failures and device removal, making these manual resets unnecessary.
quoted hunk ↗ jump to hunk
diff --git a/drivers/input/joystick/maplecontrol.c b/drivers/input/joystick/maplecontrol.c index 6293b6e8148b3..79cec89ad52a9 100644 --- a/drivers/input/joystick/maplecontrol.c +++ b/drivers/input/joystick/maplecontrol.c@@ -62,20 +62,19 @@ static void dc_pad_callback(struct mapleq *mq) static int dc_pad_open(struct input_dev *dev) {
[Severity: Medium] This is a pre-existing issue, but I noticed something while looking at the code nearby. In drivers/input/joystick/maplecontrol.c:dc_pad_callback(): input_report_abs(dev, ABS_RX, res[14]); input_report_abs(dev, ABS_RY, res[15]); } Should this callback include a call to input_sync(dev) before returning? Without input_sync(), won't the reported events (buttons and axes) be queued in the input core but not immediately delivered to userspace? This could lead to delayed or dropped inputs since they would only be delivered if another event forces a sync. [ ... ] -- Sashiko AI review · https://sashiko.dev/#/patchset/20260703-b4-maple-cleanup-v1-0-41e424964da5@gmail.com?part=10