mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
amba: tegra-ahb: Fix device leak on SMMU enable
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: 89c788bab1 ("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>
This commit is contained in:
parent
3a86608788
commit
500e1368e4
1 changed files with 1 additions and 0 deletions
|
|
@ -144,6 +144,7 @@ int tegra_ahb_enable_smmu(struct device_node *dn)
|
|||
if (!dev)
|
||||
return -EPROBE_DEFER;
|
||||
ahb = dev_get_drvdata(dev);
|
||||
put_device(dev);
|
||||
val = gizmo_readl(ahb, AHB_ARBITRATION_XBAR_CTRL);
|
||||
val |= AHB_ARBITRATION_XBAR_CTRL_SMMU_INIT_DONE;
|
||||
gizmo_writel(ahb, val, AHB_ARBITRATION_XBAR_CTRL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue