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 clk: at91: Trivial typo fixes in the file sama7g5.c 2021-03-13 13:02:02 -08:00
axis
axs10x
baikal-t1
bcm clk: bcm: rpi: Release firmware handle on unbind 2021-03-22 17:59:51 +01:00
berlin
davinci
h8300
hisilicon
imgtec
imx clk: imx: Reference preceded by free 2021-04-04 22:39:05 +03:00
ingenic
keystone treewide: Change list_sort to use const pointers 2021-04-08 16:04:22 -07:00
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 clk: renesas: Zero init clk_init_data 2021-03-30 09:58:27 +02:00
rockchip clk: rockchip: drop MODULE_ALIAS from rk3399 clock controller 2021-03-21 11:13:30 +01:00
samsung clk: samsung: Remove redundant dev_err calls 2021-04-08 19:35:26 +02:00
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 clk: sunxi: Demote non-conformant kernel-doc headers 2021-03-08 16:47:55 +01:00
sunxi-ng clk: sunxi-ng: v3s: use sigma-delta modulation for audio-pll 2021-03-06 15:41:00 +08:00
tegra clk: tegra: Don't enable PLLE HW sequencer at init 2021-03-24 14:02:14 +01:00
ti clk: ti: omap5: Add missing gpmc and ocmc clkctrl 2021-03-10 13:59:18 +02:00
uniphier clk: uniphier: Fix potential infinite loop 2021-04-12 19:09:59 -07:00
ux500
versatile
x86
xilinx
zynq
zynqmp clk: zynqmp: pll: add set_pll_mode to check condition in zynqmp_pll_enable 2021-04-07 18:09:35 -07:00
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 media: aspeed: fix clock handling logic 2021-03-11 11:59:45 +01:00
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: fix double free in resource managed fixed-factor clock 2021-04-07 16:01:25 -07:00
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: Add RISC-V Canaan Kendryte K210 clock driver 2021-02-22 17:51:04 -08:00
clk-lochnagar.c
clk-max9485.c
clk-max77686.c
clk-milbeaut.c
clk-moxart.c
clk-multiplier.c
clk-mux.c clk: mux: provide devm_clk_hw_register_mux() 2021-04-07 11:05:44 -07:00
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: scmi: Port driver to the new scmi_clk_proto_ops interface 2021-03-30 16:34:37 +01:00
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