mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 02:24:24 +02:00
drm/bridge: fix OF node leak
Make sure to drop the OF node reference taken when creating the aux
bridge device when the device is later released.
Fixes: 6914968a0b ("drm/bridge: properly refcount DT nodes in aux bridge drivers")
Cc: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250708085124.15445-2-johan@kernel.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
This commit is contained in:
parent
b213eb34f8
commit
be71ce9796
|
|
@ -18,6 +18,7 @@ static void drm_aux_bridge_release(struct device *dev)
|
|||
{
|
||||
struct auxiliary_device *adev = to_auxiliary_dev(dev);
|
||||
|
||||
of_node_put(dev->of_node);
|
||||
ida_free(&drm_aux_bridge_ida, adev->id);
|
||||
|
||||
kfree(adev);
|
||||
|
|
@ -65,6 +66,7 @@ int drm_aux_bridge_register(struct device *parent)
|
|||
|
||||
ret = auxiliary_device_init(adev);
|
||||
if (ret) {
|
||||
of_node_put(adev->dev.of_node);
|
||||
ida_free(&drm_aux_bridge_ida, adev->id);
|
||||
kfree(adev);
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user