WSL2-Linux-Kernel/drivers/clk
Tudor Ambarus bb4031b8af clk: Skip clk provider registration when np is NULL
commit 6579c8d97a ("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: 6579c8d97a ("clk: Mark fwnodes when their clock provider is added")
Fixes: 3c9ea42802 ("clk: Mark fwnodes when their clock provider is added/removed")
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Reviewed-by: Saravana Kannan <saravanak@google.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20210426065618.588144-1-tudor.ambarus@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-11 08:47:25 +02:00
..
actions
analogbits
at91
axis
axs10x
baikal-t1
bcm
berlin
davinci
h8300
hisilicon
imgtec
imx
ingenic
keystone
loongson1
mediatek
meson
microchip
mmp
mstar
mvebu clk: mvebu: armada-37xx-periph: Fix workaround for switching from L1 to L0 2021-04-09 15:17:33 +05:30
mxs
nxp
pistachio
pxa
qcom clk: qcom: rpmh: add support for SDX55 rpmh IPA clock 2021-04-12 17:55:22 -07:00
ralink clk: ralink: add clock driver for mt7621 SoC 2021-04-12 19:10:54 -07:00
renesas
rockchip
samsung
sifive clk: sifive: Use reset-simple in prci driver for PCIe driver 2021-05-04 12:26:09 +01:00
socfpga Here's a collection of largely clk driver updates for the merge window. The 2021-04-28 17:13:56 -07:00
spear
sprd
st
sunxi
sunxi-ng
tegra
ti
uniphier clk: uniphier: Fix potential infinite loop 2021-04-12 19:09:59 -07:00
ux500
versatile
x86
xilinx
zynq
zynqmp
Kconfig Here's a collection of largely clk driver updates for the merge window. The 2021-04-28 17:13:56 -07:00
Makefile Here's a collection of largely clk driver updates for the merge window. The 2021-04-28 17:13:56 -07:00
clk-asm9260.c
clk-aspeed.c
clk-aspeed.h
clk-ast2600.c
clk-axi-clkgen.c
clk-axm5516.c
clk-bd718x7.c clk: bd718x7: Add support for clk gate on ROHM BD71815 PMIC 2021-04-14 10:21:26 +01:00
clk-bm1880.c
clk-bulk.c
clk-cdce706.c
clk-cdce925.c
clk-clps711x.c
clk-composite.c
clk-conf.c
clk-cs2000-cp.c
clk-devres.c
clk-divider.c
clk-fixed-factor.c
clk-fixed-mmio.c
clk-fixed-rate.c
clk-fractional-divider.c
clk-fsl-flexspi.c
clk-fsl-sai.c
clk-gate.c
clk-gemini.c
clk-gpio.c
clk-hi655x.c
clk-highbank.c
clk-hsdk-pll.c
clk-k210.c
clk-lochnagar.c
clk-max9485.c
clk-max77686.c
clk-milbeaut.c
clk-moxart.c
clk-multiplier.c
clk-mux.c
clk-nomadik.c
clk-npcm7xx.c
clk-nspire.c
clk-oxnas.c
clk-palmas.c
clk-plldig.c
clk-pwm.c
clk-qoriq.c
clk-rk808.c
clk-s2mps11.c
clk-scmi.c
clk-scpi.c
clk-si514.c
clk-si544.c
clk-si570.c
clk-si5341.c
clk-si5351.c
clk-si5351.h
clk-sparx5.c
clk-stm32f4.c
clk-stm32h7.c
clk-stm32mp1.c
clk-twl6040.c
clk-versaclock5.c
clk-vt8500.c
clk-wm831x.c
clk-xgene.c
clk.c clk: Skip clk provider registration when np is NULL 2021-05-11 08:47:25 +02:00
clk.h
clkdev.c