linux_dsm_epyc7002/drivers/soc
Tuomas Tynkkynen 0c106e57de soc/tegra: Fix bad of_node_put() in powergate init
The for_each_child_of_node macro itself maintains the correct reference
count of the nodes so the explicit of_node_put() call causes a warning:

[    0.098960] OF: ERROR: Bad of_node_put() on /pmc@7000e400/powergates/xusba
[    0.098981] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.11.3 #1-NixOS
[    0.098996] Hardware name: NVIDIA Jetson TX1 Developer Kit (DT)
[    0.099011] Call trace:
[    0.099034] [<ffff00000808a048>] dump_backtrace+0x0/0x2a0
[    0.099051] [<ffff00000808a30c>] show_stack+0x24/0x30
[    0.099069] [<ffff0000084a6494>] dump_stack+0x9c/0xc0
[    0.099090] [<ffff000008992214>] of_node_release+0xa4/0xa8
[    0.099107] [<ffff0000084a9270>] kobject_put+0x90/0x1f8
[    0.099124] [<ffff0000089914ac>] of_node_put+0x24/0x30
[    0.099140] [<ffff00000898cec4>] __of_get_next_child+0x4c/0x70
[    0.099155] [<ffff00000898cf28>] of_get_next_child+0x40/0x68
[    0.099173] [<ffff0000090a099c>] tegra_pmc_early_init+0x4e8/0x5ac
[    0.099189] [<ffff00000808399c>] do_one_initcall+0x5c/0x168
[    0.099206] [<ffff000009050c98>] kernel_init_freeable+0xd4/0x240
[    0.099224] [<ffff000008b2d658>] kernel_init+0x18/0x108
[    0.099238] [<ffff0000080836c0>] ret_from_fork+0x10/0x50

(It's not very apparent from the OF documentation that of_node_put() is
not needed; the macro itself has no docstring and of_get_next_child()
used in the implementation begins with "Returns a node pointer with
refcount incremented" but then only at the very end of the docstring
the crucial part "Decrements the refcount of prev" is mentioned.)

Fixes: a38045121b ("soc/tegra: pmc: Add generic PM domain support")
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-07-31 12:08:55 +02:00
..
actions soc: actions: owl-sps: Factor out owl_sps_set_pg() for power-gating 2017-06-23 17:43:27 +02:00
atmel ARM: at91: add armv7m SoC detection 2017-06-02 10:11:49 +02:00
bcm This pull request contains Broadcom ARM/ARM64 SoCs specific driver changes for 2017-06-18 20:30:52 -07:00
dove soc: dove: constify reset_control_ops structures 2017-01-27 17:52:57 +01:00
fsl powerpc updates for 4.12 part 2 2017-05-12 10:04:09 -07:00
imx The i.MX drivers update for 4.13: 2017-06-18 23:05:10 -07:00
mediatek soc: mediatek: PMIC wrap: Fix possible NULL derefrence. 2017-05-15 10:47:25 +02:00
qcom soc: qcom: smsm: Improve error handling, quiesce probe deferral 2017-06-05 21:50:44 -05:00
renesas Renesas ARM Based SoC R-Car SYSC Updates for v4.13 2017-06-18 22:51:43 -07:00
rockchip soc: rockchip: add driver handling grf setup 2017-01-06 10:28:19 +01:00
samsung soc: samsung: Do not build ARMv7 PMU drivers on ARMv8 2017-03-21 19:03:39 +02:00
sunxi drivers: soc: sunxi: Fix mask generation for SRAM mapping 2016-01-27 20:29:20 +01:00
tegra soc/tegra: Fix bad of_node_put() in powergate init 2017-07-31 12:08:55 +02:00
ti net: ethernet: ti: netcp_core: return error while dma channel open issue 2017-05-11 12:39:34 -04:00
ux500 ARM: ux500: move soc_id driver to drivers/soc 2016-07-12 11:24:09 +02:00
versatile soc: versatile: dynamically detect RealView HBI numbers 2016-04-04 10:58:47 +02:00
zte soc: zte: pm_domains: Remove .owner field for driver 2017-03-08 12:40:44 +01:00
Kconfig Actions Semi SoC drivers for 4.13 2017-06-29 17:34:57 +02:00
Makefile Actions Semi SoC drivers for 4.13 2017-06-29 17:34:57 +02:00