mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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: 5b2dd77be1 ("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>
This commit is contained in:
committed by
Bjorn Andersson
parent
b5c16ea57b
commit
94124bf253
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user