HID: sony: remove unneeded WARN_ON() in sony_leds_init()
PATCH 1/1 HID: sony: remove unneeded WARN_ON() in sony_leds_init()
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 <[email protected]>
--- drivers/hid/hid-sony.c | 3 --- 1 file changed, 3 deletions(-)
drivers/hid/hid-sony.c +0 -3
@@ -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 ;
Signature · 1 line
2.53.0
Quoted 6 lines · Rosalie Wanders
This commit removes the unneeded
WARN_ON()macro usage insony_leds_init(), this is unneeded because thesony_leds_init()function call is already gated behind aSONY_LED_SUPPORTcheck insony_input_configured()Signed-off-by Rosalie Wanders <[email protected]>
Applied to hid.git#for-7.1/upstream-fixes, thanks.
Signature · 2 lines
Jiri Kosina SUSE Labs