[PATCH 7/7] HID: asus: do not try to initialize the backlight if the enpoint doesn't support it
From: Denis Benato
Date: Sat Feb 28 2026 - 09:47:26 EST
Avoid possibly printing a warning about the inability to initialize the
backlight if the hid endpoint doesn't support it.
Signed-off-by: Denis Benato <denis.benato@xxxxxxxxx>
---
drivers/hid/hid-asus.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index bcf3b0c7c758..6e9a3a3d5616 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -1309,7 +1309,8 @@ static int asus_probe(struct hid_device *hdev, const struct hid_device_id *id)
}
if (is_vendor && (drvdata->quirks & QUIRK_USE_KBD_BACKLIGHT) &&
- asus_kbd_register_leds(hdev))
+ (asus_has_report_id(hdev, FEATURE_KBD_REPORT_ID)) &&
+ (asus_kbd_register_leds(hdev)))
hid_warn(hdev, "Failed to initialize backlight.\n");
/*
--
2.53.0