summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mediatek/mt76/mt7921/init.c
diff options
context:
space:
mode:
authorJinjie Ruan <ruanjinjie@huawei.com>2023-08-22 14:30:36 +0800
committerFelix Fietkau <nbd@nbd.name>2023-09-30 20:03:04 +0200
commited160b600ffc1a23fe04c6e8c1b0210f70c45d39 (patch)
tree2fa73362a0227209060393136b325815bf96e1e7 /drivers/net/wireless/mediatek/mt76/mt7921/init.c
parent377844a7c4871a049734d79a9d9b0b31112eefb1 (diff)
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 <ruanjinjie@huawei.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7921/init.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7921/init.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
index ff63f37f67d9..534c7bee5ef1 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
@@ -55,10 +55,7 @@ static int mt7921_thermal_init(struct mt792x_phy *phy)
hwmon = devm_hwmon_device_register_with_groups(&wiphy->dev, name, phy,
mt7921_hwmon_groups);
- if (IS_ERR(hwmon))
- return PTR_ERR(hwmon);
-
- return 0;
+ return PTR_ERR_OR_ZERO(hwmon);
}
static void