diff options
-rw-r--r-- | drivers/hwmon/gpio-fan.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c index 84753680a4e8..54c27e683ee1 100644 --- a/drivers/hwmon/gpio-fan.c +++ b/drivers/hwmon/gpio-fan.c @@ -524,7 +524,9 @@ static int gpio_fan_probe(struct platform_device *pdev) err = fan_ctrl_init(fan_data); if (err) return err; - devm_add_action_or_reset(dev, gpio_fan_stop, fan_data); + err = devm_add_action_or_reset(dev, gpio_fan_stop, fan_data); + if (err) + return err; } /* Make this driver part of hwmon class. */ |