mt76: mt7915: fix possible uninitialized pointer dereference in mt7986_wmac_gpio_setup

Add default case for type switch in mt7986_wmac_gpio_setup routine in
order to avoid a possible uninitialized pointer dereference.

Fixes: 99ad32a4ca3a2 ("mt76: mt7915: add support for MT7986")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Lorenzo Bianconi
2022-04-07 12:22:27 +02:00
committed by Felix Fietkau
parent e5227f2f31
commit ec0e9f4da3
+2
View File
@@ -209,6 +209,8 @@ static int mt7986_wmac_gpio_setup(struct mt7915_dev *dev)
if (IS_ERR_OR_NULL(state))
return -EINVAL;
break;
default:
return -EINVAL;
}
ret = pinctrl_select_state(pinctrl, state);