Skip to content

Commit 75a496a

Browse files
mjruhlij-intel
authored andcommitted
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]>
1 parent ba22fe0 commit 75a496a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/platform/x86/intel/pmt/crashlog.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <linux/intel_vsec.h>
1313
#include <linux/kernel.h>
1414
#include <linux/module.h>
15+
#include <linux/mutex.h>
1516
#include <linux/pci.h>
1617
#include <linux/slab.h>
1718
#include <linux/uaccess.h>
@@ -262,8 +263,12 @@ static void pmt_crashlog_remove(struct auxiliary_device *auxdev)
262263
struct pmt_crashlog_priv *priv = auxiliary_get_drvdata(auxdev);
263264
int i;
264265

265-
for (i = 0; i < priv->num_entries; i++)
266-
intel_pmt_dev_destroy(&priv->entry[i].entry, &pmt_crashlog_ns);
266+
for (i = 0; i < priv->num_entries; i++) {
267+
struct crashlog_entry *crashlog = &priv->entry[i];
268+
269+
intel_pmt_dev_destroy(&crashlog->entry, &pmt_crashlog_ns);
270+
mutex_destroy(&crashlog->control_mutex);
271+
}
267272
}
268273

269274
static int pmt_crashlog_probe(struct auxiliary_device *auxdev,

0 commit comments

Comments
 (0)