]> git.hungrycats.org Git - linux/commit
HID: hid-lenovo-go-s: Move attribute init to after device query
authorDerek J. Clark <derekjohn.clark@gmail.com>
Mon, 14 Sep 2026 22:53:00 +0000 (15:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Nov 2026 17:10:51 +0000 (12:10 -0500)
commit313199a9902164c27ec869ab00bc52befaffc45e
tree8cffdef17d18a958e3abf6aa259258cfdc6621ad
parent542a74e19639ac0e35979189bf7ec0ed022f8644
HID: hid-lenovo-go-s: Move attribute init to after device query

commit 8f456881ba40a04494440663231ba773a06588f3 upstream.

Currently this driver registers attributes before the MCU is ready to
accept commands. This can lead to attribute access that blocks the MCU
in some rare cases.

Move attribute construction to gos_cfg_setup, after the device has been
queried. Gate creation to drvdata.gp_registered and
drvdata.rgb_registered so a resume before setup has run doesn't prevent
attribute creation or attempt to re-register the same attributes.

Fixes: a23f3497bf208c59ad ("HID: hid-lenovo-go-s: Add Lenovo Legion Go S Series HID Driver")
Cc: stable@vger.kernel.org
Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/hid-lenovo-go-s.c