Commit 9bd6823f authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau
Browse files

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: 99ad32a4 ("mt76: mt7915: add support for MT7986")
Signed-off-by: default avatarLorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 4e90db5e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -210,6 +210,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);