summaryrefslogtreecommitdiff
path: root/drivers/hwmon/npcm750-pwm-fan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/npcm750-pwm-fan.c')
-rw-r--r--drivers/hwmon/npcm750-pwm-fan.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hwmon/npcm750-pwm-fan.c b/drivers/hwmon/npcm750-pwm-fan.c
index 10ed3f4335d4..4702e4edc662 100644
--- a/drivers/hwmon/npcm750-pwm-fan.c
+++ b/drivers/hwmon/npcm750-pwm-fan.c
@@ -875,6 +875,8 @@ static int npcm7xx_en_pwm_fan(struct device *dev,
data->pwm_present[pwm_port] = true;
ret = npcm7xx_pwm_config_set(data, pwm_port,
NPCM7XX_PWM_CMR_DEFAULT_NUM);
+ if (ret)
+ return ret;
ret = of_property_count_u8_elems(child, "cooling-levels");
if (ret > 0) {