diff options
| author | Sang-Hoon Choi <csh0052@gmail.com> | 2026-09-22 03:49:28 +0900 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2026-11-20 14:59:26 +0100 |
| commit | 10bc1d627c297097cfdc099377f8a13efdfffd86 (patch) | |
| tree | 0ea9423d39d09b3d96c955ecf0f130c7f3db6cb7 /include/linux/fs | |
| parent | 314f3a84a49480488e67fabbae70a2262ea2a33c (diff) | |
HID: nintendo: release the player ID when LED setup fails
joycon_leds_create() allocates a player ID before allocating the LED
names and registering the LEDs. If one of those later steps fails,
nintendo_hid_probe() jumps to err_io_stop and skips the ID cleanup.
The failed probe leaves the allocated ID in nintendo_player_id_allocator.
Use err_ida for this failure, as the power supply and input setup error
paths already do. If the ID allocation itself failed, player_id is
U32_MAX and ida_free() leaves the allocator untouched.
Fixes: 5307de63d71d ("HID: nintendo: use ida for LED player id")
Reported-by: Changyul Lee <lcy8047@gmail.com>
Assisted-by: LLM
Signed-off-by: Sang-Hoon Choi <csh0052@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'include/linux/fs')
0 files changed, 0 insertions, 0 deletions
