Commit ac6888a
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: Eddie James <eajames@linux.ibm.com>
Link: https://lore.kernel.org/r/20220606185455.21126-1-eajames@linux.ibm.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>1 parent 5e3f89a commit ac6888a
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1228 | 1228 | | |
1229 | 1229 | | |
1230 | 1230 | | |
| 1231 | + | |
| 1232 | + | |
1231 | 1233 | | |
1232 | 1234 | | |
1233 | 1235 | | |
1234 | 1236 | | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
1235 | 1240 | | |
1236 | 1241 | | |
1237 | 1242 | | |
| |||
0 commit comments