From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"William Breathitt Gray" <wbg@kernel.org>,
"Jonathan Cameron" <Jonathan.Cameron@huawei.com>,
"Raymond Tan" <raymond.tan@intel.com>,
"Felipe Balbi (Intel)" <balbi@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Subject: [PATCH 1/1] counter: intel-qep: Use devm_mutex_init()
Date: Wed, 20 May 2026 14:18:12 +0300 [thread overview]
Message-ID: <20260520111813.3934-1-ilpo.jarvinen@linux.intel.com> (raw)
intel_qep_probe() calls mutex_init() but lacks the pairing
mutex_destroy() calls. Convert to devm_mutex_init() which handles
cleanup automatically.
Fixes: b711f687a1c1 ("counter: Add support for Intel Quadrature Encoder Peripheral")
Cc: stable@vger.kernel.org
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
drivers/counter/intel-qep.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/counter/intel-qep.c b/drivers/counter/intel-qep.c
index c49c178056f4..816586893517 100644
--- a/drivers/counter/intel-qep.c
+++ b/drivers/counter/intel-qep.c
@@ -414,7 +414,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);
base-commit: 1d5dcaa3bd65f2e8c9baa14a393d3a2dc5db7524
--
2.47.3
next reply other threads:[~2026-05-20 11:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 11:18 Ilpo Järvinen [this message]
2026-05-20 11:41 ` [PATCH 1/1] counter: intel-qep: Use devm_mutex_init() Stepan Ionichev
2026-05-20 11:42 ` Joshua Crofts
2026-05-22 1:36 ` William Breathitt Gray
2026-05-29 2:34 ` William Breathitt Gray
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260520111813.3934-1-ilpo.jarvinen@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=balbi@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=raymond.tan@intel.com \
--cc=stable@vger.kernel.org \
--cc=wbg@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox