mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
mt76: mt7915: check for devm_pinctrl_get() failure
If devm_pinctrl_get() fails then it leads to an error pointer
dereference. Add a check to prevent that.
Fixes: 99ad32a4ca ("mt76: mt7915: add support for MT7986")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
committed by
Felix Fietkau
parent
9a65768415
commit
01318bc00d
@@ -196,6 +196,8 @@ static int mt7986_wmac_gpio_setup(struct mt7915_dev *dev)
|
||||
|
||||
type = mt7986_wmac_check_adie_type(dev);
|
||||
pinctrl = devm_pinctrl_get(dev->mt76.dev);
|
||||
if (IS_ERR(pinctrl))
|
||||
return PTR_ERR(pinctrl);
|
||||
|
||||
switch (type) {
|
||||
case ADIE_SB:
|
||||
|
||||
Reference in New Issue
Block a user