android_kernel_sony_sdm845/drivers/clk
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nathan Chancellor db2451de83 clk: bcm2835: Fix return type of bcm2835_register_gate
[ Upstream commit f376c43bec4f8ee8d1ba5c5c4cfbd6e84fb279cb ]

bcm2835_register_gate is used as a callback for the clk_register member
of bcm2835_clk_desc, which expects a struct clk_hw * return type but
bcm2835_register_gate returns a struct clk *.

This discrepancy is hidden by the fact that bcm2835_register_gate is
cast to the typedef bcm2835_clk_register by the _REGISTER macro. This
turns out to be a control flow integrity violation, which is how this
was noticed.

Change the return type of bcm2835_register_gate to be struct clk_hw *
and use clk_hw_register_gate to do so. This should be a non-functional
change as clk_register_gate calls clk_hw_register_gate anyways but this
is needed to avoid issues with further changes.

Fixes: b19f009d45 ("clk: bcm2835: Migrate to clk_hw based registration and OF APIs")
Link: https://github.com/ClangBuiltLinux/linux/issues/1028
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Link: https://lkml.kernel.org/r/20200516080806.1459784-1-natechancellor@gmail.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-30 15:38:27 -04:00
..
at91 clk: at91: usb: continue if clk_hw_round_rate() return zero 2020-04-24 07:59:11 +02:00
axis
axs10x clk/axs10x: Clear init field in driver probe 2017-10-08 10:26:04 +02:00
bcm clk: bcm2835: Fix return type of bcm2835_register_gate 2020-06-30 15:38:27 -04:00
berlin clk: berlin: Pass correct type to hw provider registration 2016-11-16 11:04:17 -08:00
h8300 clk: h8300: Migrate to clk_hw based registration APIs 2016-08-24 17:37:10 -07:00
hisilicon reset: hisilicon: fix potential NULL pointer dereference 2018-11-21 09:26:00 +01:00
imx clk: vf610: fix refcount leak in vf610_clocks_init() 2020-01-29 10:24:08 +01:00
ingenic clk: ingenic: Fix doc of ingenic_cgu_div_info 2019-03-23 13:19:49 +01:00
keystone
loongson1 CLK: Add Loongson1C clock support 2016-09-23 14:49:21 -07:00
mediatek clk: mediatek: add the option for determining PLL source clock 2017-12-20 10:07:29 +01:00
meson clk: meson: meson8b: add compatibles for Meson8 and Meson8m2 2018-04-13 19:48:28 +02:00
microchip
mmp clk: mmp2: Fix the order of timer mux parents 2020-02-05 13:05:49 +00:00
mvebu clk: dove: fix refcount leak in dove_clk_init() 2020-01-29 10:24:09 +01:00
mxs
nxp clk: lpc32xx: add a quirk for PWM and MS clock dividers 2017-04-12 12:41:15 +02:00
pistachio
pxa clk: pxa: fix one of the pxa RTC clocks 2020-01-04 13:40:55 +01:00
qcom clk: qcom: msm8916: Fix the address location of pll->config_reg 2020-06-30 15:38:20 -04:00
renesas clk: renesas: cpg-mssr: Stop using printk format %pCr 2018-07-03 11:23:06 +02:00
rockchip clk: rockchip: fix rk3188 sclk_mac_lbtest parameter ordering 2019-12-21 10:40:55 +01:00
samsung clk: samsung: exynos5433: Add IGNORE_UNUSED flag to sclk_i2s1 2020-06-30 15:38:26 -04:00
sirf clk: sirf: Don't reference clk_init_data after registration 2019-10-07 18:53:10 +02:00
socfpga clk: socfpga: fix refcount leak 2020-01-29 10:24:07 +01:00
spear
st clk: clk-flexgen: fix clock-critical handling 2020-06-30 15:38:22 -04:00
sunxi clk: sunxi: Fix incorrect usage of round_down() 2020-06-30 15:38:20 -04:00
sunxi-ng clk: sunxi-ng: sun8i-a23: Enable PLL-MIPI LDOs when ungating it 2020-01-29 10:24:13 +01:00
tegra clk: tegra: Fix Tegra PMC clock out parents 2020-04-24 07:59:11 +02:00
ti clk: ti: composite: fix memory leak 2020-06-30 15:38:25 -04:00
uniphier clk: uniphier: fix DAPLL2 clock rate of Pro5 2017-12-14 09:28:24 +01:00
ux500
versatile clk: versatile/icst: support for AP baseboard clocks 2016-08-29 11:38:51 -07:00
x86
zte clk: zx296718: register driver earlier with core_initcall 2016-09-23 14:42:13 -07:00
zynq
clk-asm9260.c
clk-axi-clkgen.c clk: axi-clkgen: Correctly handle nocount bit in recalc_rate() 2018-03-24 11:00:26 +01:00
clk-axm5516.c
clk-cdce706.c
clk-cdce925.c
clk-clps711x.c
clk-composite.c
clk-conf.c clk: Fix __set_clk_rates error print-string 2018-04-13 19:48:16 +02:00
clk-cs2000-cp.c
clk-devres.c
clk-divider.c
clk-efm32gg.c clk: efm32gg: Pass correct type to hw provider registration 2016-11-16 11:08:55 -08:00
clk-fixed-factor.c clk: fixed-factor: fix of_node_get-put imbalance 2018-11-27 16:09:39 +01:00
clk-fixed-rate.c clk: fixed-rate: fix of_node_get-put imbalance 2018-11-27 16:09:38 +01:00
clk-fractional-divider.c
clk-gate.c
clk-gpio.c
clk-highbank.c clk: highbank: fix refcount leak in hb_clk_init() 2020-01-29 10:24:07 +01:00
clk-max77686.c clk: max77686: fix number of clocks setup for clk_hw based registration 2016-10-17 15:31:59 -07:00
clk-mb86s7x.c
clk-moxart.c
clk-multiplier.c
clk-mux.c
clk-nomadik.c
clk-nspire.c
clk-oxnas.c
clk-palmas.c
clk-pwm.c
clk-qoriq.c clk: qoriq: fix refcount leak in clockgen_init() 2020-01-29 10:24:07 +01:00
clk-rk808.c clk: rk808: Pass the right pointer as the get_hw context 2016-09-09 11:07:07 -07:00
clk-s2mps11.c clk: s2mps11: Add used attribute to s2mps11_dt_match 2019-09-16 08:19:34 +02:00
clk-scpi.c clk: scpi: fix return type of __scpi_dvfs_round_rate 2018-04-13 19:48:15 +02:00
clk-si514.c clk: si514: Migrate to clk_hw based OF and registration APIs 2016-08-24 17:29:59 -07:00
clk-si570.c clk: si570: Migrate to clk_hw based OF and registration APIs 2016-08-24 17:30:01 -07:00
clk-si5351.c clk: si5351: Rename internal plls to avoid name collisions 2018-03-24 11:00:26 +01:00
clk-si5351.h
clk-stm32f4.c
clk-tango4.c
clk-twl6040.c clk: clk-twl6040: Fix imprecise external abort for pdmclk 2019-03-23 13:19:49 +01:00
clk-u300.c
clk-vt8500.c clk: vt8500: Migrate to clk_hw based registration APIs 2016-08-24 17:35:48 -07:00
clk-wm831x.c clk: clk-wm831x: fix a logic error 2017-01-12 11:39:27 +01:00
clk-xgene.c clk: xgene: Don't call __pa on ioremaped address 2016-10-28 11:03:47 -07:00
clk.c clk: Don't try to enable critical clocks if prepare failed 2020-01-23 08:19:38 +01:00
clk.h
clkdev.c ARM: 8631/1: clkdev: Detect errors in clk_hw_register_clkdev() for mass registration 2017-01-15 13:42:57 +01:00
Kconfig clk: uniphier: add core support code for UniPhier clock driver 2016-09-16 16:31:33 -07:00
Makefile clk: Make x86/ conditional on CONFIG_COMMON_CLK 2017-05-14 14:00:17 +02:00