Skip to content

Commit 584debc

Browse files
jhovoldUlrich Hecht
authored andcommitted
amba: tegra-ahb: Fix device leak on SMMU enable
commit 500e1368e46928f4b2259612dcabb6999afae2a6 upstream. Make sure to drop the reference taken to the AHB platform device when looking up its driver data while enabling the SMMU. Note that holding a reference to a device does not prevent its driver data from going away. Fixes: 89c788b ("ARM: tegra: Add SMMU enabler in AHB") Cc: stable@vger.kernel.org # 3.5 Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ulrich Hecht <uli@kernel.org>
1 parent 90541f6 commit 584debc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/amba/tegra-ahb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ int tegra_ahb_enable_smmu(struct device_node *dn)
162162
if (!dev)
163163
return -EPROBE_DEFER;
164164
ahb = dev_get_drvdata(dev);
165+
put_device(dev);
165166
val = gizmo_readl(ahb, AHB_ARBITRATION_XBAR_CTRL);
166167
val |= AHB_ARBITRATION_XBAR_CTRL_SMMU_INIT_DONE;
167168
gizmo_writel(ahb, val, AHB_ARBITRATION_XBAR_CTRL);

0 commit comments

Comments
 (0)