aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/powerpc-hcalls.py
diff options
context:
space:
mode:
authorTudor Ambarus <[email protected]>2021-04-26 09:56:18 +0300
committerGreg Kroah-Hartman <[email protected]>2021-05-11 08:47:25 +0200
commitbb4031b8af804244a7e4349d38f6624f68664bd6 (patch)
treead3ccecf1f1d1e69260333ce26aa328c12ce8ed1 /tools/perf/scripts/python/powerpc-hcalls.py
parent28ec344bb8911bb0d4910456b22ba0dd4f662521 (diff)
clk: Skip clk provider registration when np is NULL
commit 6579c8d97ad7 ("clk: Mark fwnodes when their clock provider is added") revealed that clk/bcm/clk-raspberrypi.c driver calls devm_of_clk_add_hw_provider(), with a NULL dev->of_node, which resulted in a NULL pointer dereference in of_clk_add_hw_provider() when calling fwnode_dev_initialized(). Returning 0 is reducing the if conditions in driver code and is being consistent with the CONFIG_OF=n inline stub that returns 0 when CONFIG_OF is disabled. The downside is that drivers will maybe register clkdev lookups when they don't need to and waste some memory. Fixes: 6579c8d97ad7 ("clk: Mark fwnodes when their clock provider is added") Fixes: 3c9ea42802a1 ("clk: Mark fwnodes when their clock provider is added/removed") Reported-by: Marek Szyprowski <[email protected]> Tested-by: Guenter Roeck <[email protected]> Tested-by: Nathan Chancellor <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Reviewed-by: Saravana Kannan <[email protected]> Reviewed-by: Nicolas Saenz Julienne <[email protected]> Signed-off-by: Tudor Ambarus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/powerpc-hcalls.py')
0 files changed, 0 insertions, 0 deletions