mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 01:32:21 +02:00
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:
parent
4d9a902be3
commit
ca815bb870
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user