mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
Merge branch 'for-6.13/bug-on-to-warn-on' into for-linus
- removal of three way-too-aggressive BUG_ON()s from HID drivers (He Lugang)
This commit is contained in:
commit
ffca1be9b4
@ -852,7 +852,8 @@ static int cp2112_set_usb_config(struct hid_device *hdev,
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
BUG_ON(cfg->report != CP2112_USB_CONFIG);
|
if (WARN_ON(cfg->report != CP2112_USB_CONFIG))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
ret = cp2112_hid_output(hdev, (u8 *)cfg, sizeof(*cfg),
|
ret = cp2112_hid_output(hdev, (u8 *)cfg, sizeof(*cfg),
|
||||||
HID_FEATURE_REPORT);
|
HID_FEATURE_REPORT);
|
||||||
|
@ -1350,7 +1350,8 @@ int lg4ff_init(struct hid_device *hid)
|
|||||||
|
|
||||||
/* Initialize device properties */
|
/* Initialize device properties */
|
||||||
if (mmode_ret == LG4FF_MMODE_IS_MULTIMODE) {
|
if (mmode_ret == LG4FF_MMODE_IS_MULTIMODE) {
|
||||||
BUG_ON(mmode_idx == -1);
|
if (WARN_ON(mmode_idx == -1))
|
||||||
|
return -EINVAL;
|
||||||
mmode_wheel = &lg4ff_multimode_wheels[mmode_idx];
|
mmode_wheel = &lg4ff_multimode_wheels[mmode_idx];
|
||||||
}
|
}
|
||||||
lg4ff_init_wheel_data(&entry->wdata, &lg4ff_devices[i], mmode_wheel, real_product_id);
|
lg4ff_init_wheel_data(&entry->wdata, &lg4ff_devices[i], mmode_wheel, real_product_id);
|
||||||
|
@ -1379,7 +1379,8 @@ static int sony_leds_init(struct sony_sc *sc)
|
|||||||
u8 max_brightness[MAX_LEDS] = { [0 ... (MAX_LEDS - 1)] = 1 };
|
u8 max_brightness[MAX_LEDS] = { [0 ... (MAX_LEDS - 1)] = 1 };
|
||||||
u8 use_hw_blink[MAX_LEDS] = { 0 };
|
u8 use_hw_blink[MAX_LEDS] = { 0 };
|
||||||
|
|
||||||
BUG_ON(!(sc->quirks & SONY_LED_SUPPORT));
|
if (WARN_ON(!(sc->quirks & SONY_LED_SUPPORT)))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
if (sc->quirks & BUZZ_CONTROLLER) {
|
if (sc->quirks & BUZZ_CONTROLLER) {
|
||||||
sc->led_count = 4;
|
sc->led_count = 4;
|
||||||
|
Loading…
Reference in New Issue
Block a user