Skip to content

Commit 1d18fb5

Browse files
jhovoldgregkh
authored andcommitted
amba: tegra-ahb: Fix device leak on SMMU enable
commit 500e136 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>
1 parent 70cf3d6 commit 1d18fb5

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
@@ -144,6 +144,7 @@ int tegra_ahb_enable_smmu(struct device_node *dn)
144144
if (!dev)
145145
return -EPROBE_DEFER;
146146
ahb = dev_get_drvdata(dev);
147+
put_device(dev);
147148
val = gizmo_readl(ahb, AHB_ARBITRATION_XBAR_CTRL);
148149
val |= AHB_ARBITRATION_XBAR_CTRL_SMMU_INIT_DONE;
149150
gizmo_writel(ahb, val, AHB_ARBITRATION_XBAR_CTRL);

0 commit comments

Comments
 (0)