Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

soc: qcom: pbs: fix device leak on lookup

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>
Link: https://lore.kernel.org/r/20250926143511.6715-3-johan@kernel.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Johan Hovold and committed by
Bjorn Andersson
94124bf2 b5c16ea5

+2
+2
drivers/soc/qcom/qcom-pbs.c
··· 173 173 return ERR_PTR(-EINVAL); 174 174 } 175 175 176 + platform_device_put(pdev); 177 + 176 178 return pbs; 177 179 } 178 180 EXPORT_SYMBOL_GPL(get_pbs_client_device);