diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-11 14:44:13 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-11 14:44:13 -0700 |
commit | 64b08df460cfdfc2b010263043a057cdd33500ed (patch) | |
tree | d993ef73fa985a9f40bebeae84ac934370820d84 /drivers/hwmon/pwm-fan.c | |
parent | c079512aad9718c12c6bb1b661880b15a73dfd69 (diff) | |
parent | 9f7546570bcb20debfaa97bcf720fa0fcb8fc05a (diff) |
Merge tag 'hwmon-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Pull hwmon updates from Guenter Roeck:
- New drivers for Infineon PXE1610 and IRPS5401
- Minor improvements, cleanup, and fixes in several drivers
* tag 'hwmon-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (33 commits)
hwmon: (ina3221) Add of_node_put() before return
hwmon: (gpio-fan) fix sysfs notifications and udev events for gpio-fan alarms
hwmon: (gpio-fan) move fan_alarm_init after devm_hwmon_device_register_with_groups
hwmon: (lm90) Introduce function to update configuration register
hwmon: (lm90) Cache configuration register value
hwmon: (lm90) Fix max6658 sporadic wrong temperature reading
hwmon: (nct7904) Changes comments in probe function.
hwmon: (nct7904) Add error handling in probe function.
hwmon: Convert remaining drivers to use SPDX identifier
hwmon: (max6650) Fix unused variable warning
hwmon: (pmbus/adm1275) Fix power sampling support
hwmon: (lm90) simplify getting the adapter of a client
hwmon: (asus_atk0110) no need to check return value of debugfs_create functions
hwmon: (max6650) Fix minor formatting issues
hwmon: (max6650) Improve error handling in max6650_update_device
hwmon: (max6650) Read non-volatile registers only once
hwmon: (max6650) Convert to use devm_hwmon_device_register_with_info
hwmon: (max6650) Simplify alarm handling
hwmon: (max6650) Cache alarm_en register
hwmon: (max6650) Declare valid as boolean
...
Diffstat (limited to 'drivers/hwmon/pwm-fan.c')
-rw-r--r-- | drivers/hwmon/pwm-fan.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c index 08c9b9f1c16e..54c0ff00d67f 100644 --- a/drivers/hwmon/pwm-fan.c +++ b/drivers/hwmon/pwm-fan.c @@ -320,8 +320,10 @@ static int pwm_fan_probe(struct platform_device *pdev) dev_err(dev, "Failed to enable fan supply: %d\n", ret); return ret; } - devm_add_action_or_reset(dev, pwm_fan_regulator_disable, - ctx->reg_en); + ret = devm_add_action_or_reset(dev, pwm_fan_regulator_disable, + ctx->reg_en); + if (ret) + return ret; } ctx->pwm_value = MAX_PWM; @@ -337,7 +339,9 @@ static int pwm_fan_probe(struct platform_device *pdev) return ret; } timer_setup(&ctx->rpm_timer, sample_timer, 0); - devm_add_action_or_reset(dev, pwm_fan_pwm_disable, ctx); + ret = devm_add_action_or_reset(dev, pwm_fan_pwm_disable, ctx); + if (ret) + return ret; of_property_read_u32(dev->of_node, "pulses-per-revolution", &ppr); ctx->pulses_per_revolution = ppr; |