]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
hwmon: (pwm-fan) Check return value from devm_add_action_or_reset
authorGuenter Roeck <linux@roeck-us.net>
Fri, 7 Jun 2019 20:27:06 +0000 (13:27 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 24 Jun 2019 01:32:34 +0000 (18:32 -0700)
commit5696e4aaabf2a6bae0fe8b4abf17fe17c2b03beb
treef28c240ade7c7c6bc59aa862d670684c93080988
parentb9bb92e1d1be921e91d8b469dc1261ea5ac71991
hwmon: (pwm-fan) Check return value from devm_add_action_or_reset

devm_add_action_or_reset() can fail due to a memory allocation failure.
Check for it and return the error if that happens.

Fixes: 37bcec5d9f71 ("hwmon: (pwm-fan) Use devm_thermal_of_cooling_device_register")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pwm-fan.c