hwmon: (npcm750-pwm) Add an error code check in npcm7xx_en_pwm_fan
authorSu Hui <suhui@nfschina.com>
Fri, 20 Oct 2023 08:55:19 +0000 (16:55 +0800)
committerGuenter Roeck <linux@roeck-us.net>
Sat, 28 Oct 2023 16:21:36 +0000 (09:21 -0700)
commitb92b2984a5b62099ab7731bc3a30a0d7c83a01d4
treecb063573b6b87553a0106723c275eb4e073b4b66
parent748465a53eedbc2c440ac07f6b2328de6263dbfd
hwmon: (npcm750-pwm) Add an error code check in npcm7xx_en_pwm_fan

npcm7xx_pwm_config_set() can return '-ENODEV' for failed. So check
the value of 'ret' after calling npcm7xx_pwm_config_set().

Signed-off-by: Su Hui <suhui@nfschina.com>
Link: https://lore.kernel.org/r/20231020085518.198477-1-suhui@nfschina.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/npcm750-pwm-fan.c