diff options
| author | Michael J. Ruhl <[email protected]> | 2025-07-13 17:29:35 +0000 |
|---|---|---|
| committer | Ilpo Järvinen <[email protected]> | 2025-07-22 14:38:54 +0000 |
| commit | 75a496aa054326d9ebf27b39e1af8b5b770311ba (patch) | |
| tree | a00305bac6bc88f2514eef174aa75101b0a86b00 /drivers/platform/x86/intel/pmt/crashlog.c | |
| parent | platform/x86/intel/pmt: white space cleanup (diff) | |
| download | kernel-75a496aa054326d9ebf27b39e1af8b5b770311ba.tar.gz kernel-75a496aa054326d9ebf27b39e1af8b5b770311ba.zip | |
platform/x86/intel/pmt: mutex clean up
The header file for mutex usage and mutex_destroy() cleanup code is
absent from the crashlog.c module.
Add the header file and mutex_destroy().
Reviewed-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Michael J. Ruhl <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ilpo Järvinen <[email protected]>
Diffstat (limited to 'drivers/platform/x86/intel/pmt/crashlog.c')
| -rw-r--r-- | drivers/platform/x86/intel/pmt/crashlog.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/platform/x86/intel/pmt/crashlog.c b/drivers/platform/x86/intel/pmt/crashlog.c index d40c8e212733..6e32fc1f8f1d 100644 --- a/drivers/platform/x86/intel/pmt/crashlog.c +++ b/drivers/platform/x86/intel/pmt/crashlog.c @@ -12,6 +12,7 @@ #include <linux/intel_vsec.h> #include <linux/kernel.h> #include <linux/module.h> +#include <linux/mutex.h> #include <linux/pci.h> #include <linux/slab.h> #include <linux/uaccess.h> @@ -262,8 +263,12 @@ static void pmt_crashlog_remove(struct auxiliary_device *auxdev) struct pmt_crashlog_priv *priv = auxiliary_get_drvdata(auxdev); int i; - for (i = 0; i < priv->num_entries; i++) - intel_pmt_dev_destroy(&priv->entry[i].entry, &pmt_crashlog_ns); + for (i = 0; i < priv->num_entries; i++) { + struct crashlog_entry *crashlog = &priv->entry[i]; + + intel_pmt_dev_destroy(&crashlog->entry, &pmt_crashlog_ns); + mutex_destroy(&crashlog->control_mutex); + } } static int pmt_crashlog_probe(struct auxiliary_device *auxdev, |
