mt76: mt7915: fix using null pointer when wfsys on

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Peter Chiu
2022-04-07 12:11:11 +02:00
committed by Felix Fietkau
parent 87a962e060
commit 2accb74e6b
+4 -4
View File
@@ -1127,7 +1127,7 @@ static int mt7986_wmac_init(struct mt7915_dev *dev)
if (IS_ERR(dev->rstc))
return PTR_ERR(dev->rstc);
return mt7986_wmac_enable(dev);
return 0;
}
static int mt7986_wmac_probe(struct platform_device *pdev)
@@ -1160,13 +1160,13 @@ static int mt7986_wmac_probe(struct platform_device *pdev)
if (ret)
goto free_device;
mt7915_wfsys_reset(dev);
mt76_wr(dev, MT_INT_MASK_CSR, 0);
ret = mt7986_wmac_init(dev);
if (ret)
goto free_irq;
mt7915_wfsys_reset(dev);
mt76_wr(dev, MT_INT_MASK_CSR, 0);
ret = mt7915_register_device(dev);
if (ret)
goto free_irq;