zephyr/drivers/clock_control
François Baldassari e94af5b153 Litex: clock: Undefined behavior due to unchecked return code
Found via static analysis. Two separate error paths where failing to
check the return code leads to undefined behavior:
1. In `litex_clk_get_phase`, the divider stays set to 0 when
   `litex_clk_get_clkout_divider` errors out, which leads to a division
by 0.
2. In `litex_clk_calc_duty_normal`, the `duty` struct is used
   uninitialized if `litex_clk_get_duty_cycle` errors out.

In both case, checking the return code and returning early resolves the
issue.

Signed-off-by: François Baldassari <francois@memfault.com>
2024-06-10 15:00:33 +03:00
..
CMakeLists.txt drivers: clock: stm32 clock driver supporting the stm32H7RS 2024-06-06 00:41:43 -07:00
Kconfig drivers: clock_control: nrf_auxpll: add initial driver 2024-05-29 08:30:42 -07:00
Kconfig.agilex5
Kconfig.ambiq
Kconfig.aspeed
Kconfig.beetle
Kconfig.cavs
Kconfig.esp32
Kconfig.fixed
Kconfig.gd32
Kconfig.ifx_cat1
Kconfig.litex
Kconfig.lpc11u6x
Kconfig.max32 drivers: Add MAX32690 clock control driver 2024-05-29 07:30:12 +02:00
Kconfig.mcux_ccm
Kconfig.mcux_ccm_rev2
Kconfig.mcux_mcg
Kconfig.mcux_pcc
Kconfig.mcux_scg
Kconfig.mcux_sim
Kconfig.mcux_syscon
Kconfig.npcx drivers: clock_control: Fix npcx leakage 2024-03-11 07:57:49 -04:00
Kconfig.nrf drivers/clock_control nrf: Treat simulated nRF54L15 like real 2024-06-04 14:04:57 -05:00
Kconfig.nrf_auxpll drivers: clock_control: nrf_auxpll: add initial driver 2024-05-29 08:30:42 -07:00
Kconfig.numaker
Kconfig.nxp_s32
Kconfig.pwm
Kconfig.rcar hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
Kconfig.renesas_ra drivers: clock: Rename renesas ra driver 2024-01-29 11:32:46 +01:00
Kconfig.rpi_pico
Kconfig.rv32m1
Kconfig.sam
Kconfig.smartbond dts/bindings/renesas,smartbond-lp-osc: Substitute calibration-interval 2024-05-21 18:43:43 +02:00
Kconfig.stm32 drivers: clock: stm32 clock driver supporting the stm32H7RS 2024-06-06 00:41:43 -07:00
Kconfig.xec
beetle_clock_control.c
clock_agilex.c
clock_agilex_ll.c
clock_control_adsp.c
clock_control_agilex5.c
clock_control_agilex5_ll.c
clock_control_agilex5_ll.h
clock_control_ambiq.c
clock_control_ast10x0.c
clock_control_esp32.c drivers: wdt: espressif: Add 32K Xtal Watchdog 2024-05-30 16:52:37 -05:00
clock_control_fixed_rate.c
clock_control_gd32.c
clock_control_ifx_cat1.c boards: arm: Introduce Infineon CYW920829M2EVK-02 board 2024-05-24 18:05:11 -04:00
clock_control_litex.c Litex: clock: Undefined behavior due to unchecked return code 2024-06-10 15:00:33 +03:00
clock_control_litex.h
clock_control_lpc11u6x.c
clock_control_lpc11u6x.h
clock_control_max32.c drivers: Add MAX32690 clock control driver 2024-05-29 07:30:12 +02:00
clock_control_mchp_xec.c hwmv2: Introduce Hardware model version 2 and convert devices 2024-03-02 16:56:33 -05:00
clock_control_mcux_ccm.c clock: mcux_ccm: add gpt ipg clock 2024-04-09 11:06:24 +02:00
clock_control_mcux_ccm_rev2.c drivers: clock_control: mcux_ccm_rev2: Add ENET_1G clock 2024-06-06 20:08:27 -04:00
clock_control_mcux_mcg.c
clock_control_mcux_pcc.c drivers: clock: clock_control_mcux_pcc: add support for 8ULP 2024-04-02 14:30:27 +01:00
clock_control_mcux_scg.c drivers: clock_control: add a macro for mke17z9 to wrap flexbus clock 2024-06-07 09:55:56 +02:00
clock_control_mcux_sim.c drivers: clock_control: mcux_sim: PTP clock 2024-04-18 11:18:31 +02:00
clock_control_mcux_syscon.c drivers: clock control: mcux: syscon: add FlexCAN clock support 2024-06-06 15:46:57 +01:00
clock_control_npcx.c drivers: clock_control: npcx: add MCLKD as i3c source clock 2024-04-24 19:40:28 +00:00
clock_control_nrf.c
clock_control_nrf_auxpll.c drivers: clock_control: nrf_auxpll: add lock timeout 2024-06-03 03:39:26 -07:00
clock_control_numaker_scc.c
clock_control_nxp_s32.c
clock_control_pwm.c
clock_control_r8a779f0_cpg_mssr.c drivers: clock_control: r8a779f0: add clocks related to MMC 2024-02-28 12:38:23 +01:00
clock_control_r8a7795_cpg_mssr.c drivers: clock: rcar: harmonize r8a7795 and r8a779f0 drivers 2024-01-29 11:33:09 +01:00
clock_control_renesas_cpg_mssr.c
clock_control_renesas_cpg_mssr.h drivers: clock: rcar: r8a7795 driver cleanup 2024-01-29 11:33:09 +01:00
clock_control_renesas_ra.c drivers: clock_control: ra: sub-clock oscillator select fix 2024-02-15 09:20:30 +01:00
clock_control_rpi_pico.c
clock_control_rv32m1_pcc.c
clock_control_sam_pmc.c
clock_control_smartbond.c drivers: clock_control: smartbond: Update clock control driver 2024-06-03 15:41:20 +02:00
clock_stm32_ll_common.c drivers: clock: stm32f1,f3: fix adc prescaler 2024-06-04 13:39:14 +02:00
clock_stm32_ll_common.h drivers: clock_control: stm32: adding config_regulator_voltage for L0 2024-05-30 09:47:12 -05:00
clock_stm32_ll_h5.c drivers: clock_control: stm32: clean up unnecessary code 2024-05-27 08:16:30 -07:00
clock_stm32_ll_h7.c drivers: clock: stm32 clock driver supporting the stm32H7RS 2024-06-06 00:41:43 -07:00
clock_stm32_ll_mco.h drivers: clock: stm32 clock driver supporting the stm32H7RS 2024-06-06 00:41:43 -07:00
clock_stm32_ll_mp1.c
clock_stm32_ll_u5.c drivers: clock_control: stm32: clean up unnecessary code 2024-05-27 08:16:30 -07:00
clock_stm32_ll_wba.c drivers: clock_control: stm32: clean up unnecessary code 2024-05-27 08:16:30 -07:00
clock_stm32_mux.c
clock_stm32c0.c
clock_stm32f0_f3.c drivers: clock: stm32f1,f3: fix adc prescaler 2024-06-04 13:39:14 +02:00
clock_stm32f1.c drivers: clock: stm32f1,f3: fix adc prescaler 2024-06-04 13:39:14 +02:00
clock_stm32f2_f4_f7.c clock_control: stm32f4: add PLLR division factor 2024-01-08 12:33:36 +01:00
clock_stm32g0.c
clock_stm32g4.c
clock_stm32l0_l1.c drivers: clock_control: stm32: adding config_regulator_voltage for L0 2024-05-30 09:47:12 -05:00
clock_stm32l4_l5_wb_wl.c
nrf_clock_calibration.c
nrf_clock_calibration.h