Skip to content

Commit 9515153

Browse files
jhovoldgregkh
authored andcommitted
soc: qcom: pbs: fix device leak on lookup
commit 94124bf upstream. 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: 5b2dd77 ("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b2d6246 commit 9515153

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/soc/qcom/qcom-pbs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ struct pbs_dev *get_pbs_client_device(struct device *dev)
173173
return ERR_PTR(-EINVAL);
174174
}
175175

176+
platform_device_put(pdev);
177+
176178
return pbs;
177179
}
178180
EXPORT_SYMBOL_GPL(get_pbs_client_device);

0 commit comments

Comments
 (0)