wifi: mt76: Use PTR_ERR_OR_ZERO() to simplify code

Return PTR_ERR_OR_ZERO() instead of return 0 or PTR_ERR() to
simplify code.

Signed-off-by: Jinjie Ruan <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Jinjie Ruan
2023-09-16 14:12:29 +02:00
committed by Felix Fietkau
parent d497ee8aa2
commit 8ccc841111
4 changed files with 4 additions and 16 deletions
+1 -4
View File
@@ -1220,10 +1220,7 @@ static int mt798x_wmac_init(struct mt7915_dev *dev)
return PTR_ERR(dev->sku);
dev->rstc = devm_reset_control_get(pdev, "consys");
if (IS_ERR(dev->rstc))
return PTR_ERR(dev->rstc);
return 0;
return PTR_ERR_OR_ZERO(dev->rstc);
}
static int mt798x_wmac_probe(struct platform_device *pdev)