mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
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:
committed by
Felix Fietkau
parent
d497ee8aa2
commit
8ccc841111
+1
-4
@@ -58,10 +58,7 @@ int mt7615_thermal_init(struct mt7615_dev *dev)
|
||||
wiphy_name(wiphy));
|
||||
hwmon = devm_hwmon_device_register_with_groups(&wiphy->dev, name, dev,
|
||||
mt7615_hwmon_groups);
|
||||
if (IS_ERR(hwmon))
|
||||
return PTR_ERR(hwmon);
|
||||
|
||||
return 0;
|
||||
return PTR_ERR_OR_ZERO(hwmon);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt7615_thermal_init);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user