mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
HID: steelseries: Fix STEELSERIES_SRWS1 handling in steelseries_remove()
srws1_remove label can be only reached only if LEDS subsystem is enabled. To
avoid putting horryfing ifdef second time around the label, just perform
the cleanup and exit immediately directly.
Fixes: a84eeacbf9 ("HID: steelseries: refactor probe() and remove()")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202509090334.76D4qGtW-lkp@intel.com/
Signed-off-by: Jiri Kosina <jkosina@suse.com>
This commit is contained in:
parent
a84eeacbf9
commit
2910913ef8
1 changed files with 1 additions and 2 deletions
|
|
@ -582,7 +582,7 @@ static void steelseries_remove(struct hid_device *hdev)
|
|||
if (hdev->product == USB_DEVICE_ID_STEELSERIES_SRWS1) {
|
||||
#if IS_BUILTIN(CONFIG_LEDS_CLASS) || \
|
||||
(IS_MODULE(CONFIG_LEDS_CLASS) && IS_MODULE(CONFIG_HID_STEELSERIES))
|
||||
goto srws1_remove;
|
||||
hid_hw_stop(hdev);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
|
@ -596,7 +596,6 @@ static void steelseries_remove(struct hid_device *hdev)
|
|||
cancel_delayed_work_sync(&sd->battery_work);
|
||||
|
||||
hid_hw_close(hdev);
|
||||
srws1_remove:
|
||||
hid_hw_stop(hdev);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue