Skip to content
Commit c0c45238 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Guenter Roeck
Browse files

hwmon: (peci) Use devm_delayed_work_autocancel() to simplify code



Use devm_delayed_work_autocancel() instead of hand writing it. This is
less verbose and saves a few lines of code.

devm_delayed_work_autocancel() uses devm_add_action() instead of
devm_add_action_or_reset(). This is fine, because if the underlying memory
allocation fails, no work has been scheduled yet. So there is nothing to
undo.

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarIwona Winiarska <iwona.winiarska@intel.com>
Link: https://lore.kernel.org/r/fd277a708ede3882d7df6831f02d2e3c0cb813b8.1644781718.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent ab9ac6df
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment