[PATCH] HID: sony: remove unneeded WARN_ON() in sony_leds_init()

Rosalie Wanders posted 1 patch 2 months, 1 week ago
drivers/hid/hid-sony.c | 3 ---
1 file changed, 3 deletions(-)
[PATCH] HID: sony: remove unneeded WARN_ON() in sony_leds_init()
Posted by Rosalie Wanders 2 months, 1 week ago
This commit removes the unneeded WARN_ON() macro usage in
sony_leds_init(), this is unneeded because the sony_leds_init() function
call is already gated behind a SONY_LED_SUPPORT check in
sony_input_configured()

Signed-off-by: Rosalie Wanders <rosalie@mailbox.org>
---
 drivers/hid/hid-sony.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 23db406092ef..6a860b9ef677 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -1640,9 +1640,6 @@ static int sony_leds_init(struct sony_sc *sc)
 	u8 max_brightness[MAX_LEDS] = { [0 ... (MAX_LEDS - 1)] = 1 };
 	u8 use_hw_blink[MAX_LEDS] = { 0 };
 
-	if (WARN_ON(!(sc->quirks & SONY_LED_SUPPORT)))
-		return -EINVAL;
-
 	if (sc->quirks & BUZZ_CONTROLLER) {
 		sc->led_count = 4;
 		use_color_names = 0;
-- 
2.53.0
Re: [PATCH] HID: sony: remove unneeded WARN_ON() in sony_leds_init()
Posted by Jiri Kosina 1 month, 3 weeks ago
On Sat, 11 Apr 2026, Rosalie Wanders wrote:

> This commit removes the unneeded WARN_ON() macro usage in
> sony_leds_init(), this is unneeded because the sony_leds_init() function
> call is already gated behind a SONY_LED_SUPPORT check in
> sony_input_configured()
> 
> Signed-off-by: Rosalie Wanders <rosalie@mailbox.org>

Applied to hid.git#for-7.1/upstream-fixes, thanks.

-- 
Jiri Kosina
SUSE Labs