aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
diff options
context:
space:
mode:
authorManivannan Sadhasivam <[email protected]>2024-07-17 04:27:46 +0000
committerLinus Torvalds <[email protected]>2024-07-18 18:08:20 +0000
commit24777bac4af5fcddb0cf4a7d8a2b6ee2a98fe6fd (patch)
treee98eee2342eda1e84e612d87e74e7b79a0fd7908 /tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
parentinit/Kconfig: remove CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND (diff)
downloadkernel-24777bac4af5fcddb0cf4a7d8a2b6ee2a98fe6fd.tar.gz
kernel-24777bac4af5fcddb0cf4a7d8a2b6ee2a98fe6fd.zip
PCI: Check for the existence of 'dev.of_node' before calling of_platform_populate()
Commit 50b040ef3732 ("PCI/pwrctl: only call of_platform_populate() if CONFIG_OF is enabled") added the CONFIG_OF guard for the of_platform_populate() API. But it missed the fact that the CONFIG_OF platforms can also run on ACPI without devicetree (so dev.of_node will be NULL). In those cases, of_platform_populate() will fail with below error messages as seen on the Ampere Altra box: pci 000c:00:01.0: failed to populate child OF nodes (-22) pci 000c:00:02.0: failed to populate child OF nodes (-22) Fix this by checking for the existence of 'dev.of_node' before calling the of_platform_populate() API. This also warrants the removal of CONFIG_OF check, since dev_of_node() helper will return NULL if CONFIG_OF is not enabled. While at it, let's also use dev_of_node() to pass device OF node pointer to of_platform_populate(). Fixes: 50b040ef3732 ("PCI/pwrctl: only call of_platform_populate() if CONFIG_OF is enabled") Reported-by: Linus Torvalds <[email protected]> Closes: https://lore.kernel.org/linux-arm-msm/CAHk-=wjcO_9dkNf-bNda6bzykb5ZXWtAYA97p7oDsXPHmMRi6g@mail.gmail.com Reviewed-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Manivannan Sadhasivam <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c')
0 files changed, 0 insertions, 0 deletions