diff options
| author | Kang Chen <void0red@gmail.com> | 2023-02-27 17:15:34 +0800 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2023-04-19 07:08:31 -0700 |
| commit | dbfeafdad31c52da8965819a298ed3b0127025e7 (patch) | |
| tree | ce5c2c22c84c40aad002a70d8a5be99c95f8411c /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | 37ef30fbf2894e1acd5aa7cc1dccfc54039cecd5 (diff) | |
| download | linux-dbfeafdad31c52da8965819a298ed3b0127025e7.tar.gz linux-dbfeafdad31c52da8965819a298ed3b0127025e7.zip | |
hwmon: (nzxt-smart2) handle failure of devm_add_action in nzxt_smart2_hid_probe
1. replace the devm_add_action with devm_add_action_or_reset to ensure
the mutex lock can be destroyed when it fails.
2. use local wrapper function mutex_fini instead of mutex_destroy to
avoid undefined behaviours.
3. add a check of devm_add_action_or_reset and return early when it fails.
Link: https://lore.kernel.org/all/f5043281-9b3e-e454-16fe-ef4cde36dfdb@roeck-us.net
Signed-off-by: Kang Chen <void0red@gmail.com>
Link: https://lore.kernel.org/r/20230227091534.907101-1-void0red@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions
