counter: intel-qep: Use devm_mutex_init()

intel_qep_probe() calls mutex_init() but lacks the pairing
mutex_destroy() calls. Convert to devm_mutex_init() which handles
cleanup automatically.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com>
Reviewed-by: Stepan Ionichev <sozdayvek@gmail.com>
Link: https://lore.kernel.org/r/20260520111813.3934-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: William Breathitt Gray <wbg@kernel.org>
This commit is contained in:
Ilpo Järvinen 2026-05-20 14:18:12 +03:00 committed by William Breathitt Gray
parent 4d9a902be3
commit ca815bb870

View File

@ -400,7 +400,9 @@ static int intel_qep_probe(struct pci_dev *pci, const struct pci_device_id *id)
qep->dev = dev;
qep->regs = regs;
mutex_init(&qep->lock);
ret = devm_mutex_init(dev, &qep->lock);
if (ret)
return ret;
intel_qep_init(qep);
pci_set_drvdata(pci, qep);