Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e7914620 authored by Roderick Colenbrander's avatar Roderick Colenbrander Committed by Kim Low
Browse files

UPSTREAM: HID: sony: Fix memory issue when connecting device using both Bluetooth and USB



A previous patch moved most input initialization from sony_probe to
sony_input_configured to avoid some race conditions. The driver has some
special logic to prevent the device to get registered twice in case the
user connects it both over Bluetooth and USB. When this condition
happens sony_input_configured returns a failure, but sony_probe continues
as hid_hw_start doesn't fail. As was discussed on linux-input, it is
acceptable for this function to fail.

This patch adds a check for the HID_CLAIMED_INPUT flag within sony_probe
to determine whether initialization succeeded correctly. The flag is
not set by the HID layer when sony_input_configured fails.

Signed-off-by: default avatarRoderick Colenbrander <roderick.colenbrander@sony.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
(cherry picked from commit 4f967f6d73746f66514528cc1191025f0b5d69b3)

Bug: 111431828
Signed-off-by: default avatarKim Low <kim-huei.low@sony.com>
Change-Id: I857c028f7571c2223a3d04310e499b6cdb70c3e8
parent 5ffc4c1e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment