From: Johan Hovold <johan@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
Johan Hovold <johan@kernel.org>,
stable@vger.kernel.org,
Anjelique Melendez <quic_amelende@quicinc.com>
Subject: [PATCH 2/2] soc: qcom: pbs: fix device leak on lookup
Date: Fri, 26 Sep 2025 16:35:11 +0200 [thread overview]
Message-ID: <20250926143511.6715-3-johan@kernel.org> (raw)
In-Reply-To: <20250926143511.6715-1-johan@kernel.org>
Make sure to drop the reference taken to the pbs platform device when
looking up its driver data.
Note that holding a reference to a device does not prevent its driver
data from going away so there is no point in keeping the reference.
Fixes: 5b2dd77be1d8 ("soc: qcom: add QCOM PBS driver")
Cc: stable@vger.kernel.org # 6.9
Cc: Anjelique Melendez <quic_amelende@quicinc.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/soc/qcom/qcom-pbs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/soc/qcom/qcom-pbs.c b/drivers/soc/qcom/qcom-pbs.c
index 1cc5d045f9dd..06b4a596e275 100644
--- a/drivers/soc/qcom/qcom-pbs.c
+++ b/drivers/soc/qcom/qcom-pbs.c
@@ -173,6 +173,8 @@ struct pbs_dev *get_pbs_client_device(struct device *dev)
return ERR_PTR(-EINVAL);
}
+ platform_device_put(pdev);
+
return pbs;
}
EXPORT_SYMBOL_GPL(get_pbs_client_device);
--
2.49.1
next prev parent reply other threads:[~2025-09-26 14:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-26 14:35 [PATCH 0/2] soc: qcom: ocmem/pbs: fix device leaks on lookup Johan Hovold
2025-09-26 14:35 ` [PATCH 1/2] soc: qcom: ocmem: fix device leak " Johan Hovold
2025-09-26 18:42 ` Markus Elfring
2025-09-26 21:08 ` Brian Masney
2025-09-26 14:35 ` Johan Hovold [this message]
2025-09-26 18:55 ` [PATCH 2/2] soc: qcom: pbs: " Markus Elfring
2025-10-27 14:09 ` [PATCH 0/2] soc: qcom: ocmem/pbs: fix device leaks " Bjorn Andersson
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=20250926143511.6715-3-johan@kernel.org \
--to=johan@kernel.org \
--cc=andersson@kernel.org \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_amelende@quicinc.com \
--cc=stable@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.