hwmon: (occ) Lock mutex in shutdown to prevent race with occ_active
Unbinding the driver or removing the parent device at the same time as using the OCC active sysfs file can cause the driver to unregister the hwmon device twice. Prevent this by locking the occ mutex in the shutdown function. Signed-off-by: NEddie James <eajames@linux.ibm.com> Link: https://lore.kernel.org/r/20220606185455.21126-1-eajames@linux.ibm.comSigned-off-by: NGuenter Roeck <linux@roeck-us.net>
Showing
想要评论请 注册 或 登录