aboutsummaryrefslogtreecommitdiff
path: root/security/security.c
diff options
context:
space:
mode:
authorArnd Bergmann2023-12-12 22:45:22 +0100
committerLee Jones2023-12-13 16:20:04 +0000
commit40cfa414e7f99ea0aa3b578e382eed93540c3641 (patch)
tree9fc9f51658be88aea1df1804bb725a5e73fdb052 /security/security.c
parentc82a1662d4548c454de5343b88f69b9fc82266b3 (diff)
leds: sun50i-a100: Avoid division-by-zero warning
When CONFIG_COMMON_CLK is disabled, e.g. on an x86 randconfig compile test, clang reports a field overflow from propagating the result of a division by zero: drivers/leds/leds-sun50i-a100.c:309:12: error: call to '__compiletime_assert_265' declared with 'error' attribute: FIELD_PREP: value too large for the field control = FIELD_PREP(LEDC_T01_TIMING_CTRL_REG_T1H, timing->t1h_ns / cycle_ns) | Avoid the problem by adding an explicit check for the zero value here. Alternatively the assertion could be avoided with a Kconfig dependency on COMMON_CLK. Fixes: 090a25ad9798 ("leds: sun50i-a100: New driver for the A100 LED controller") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Guo Ren <guoren@kernel.org> Link: https://lore.kernel.org/r/20231212214536.175327-1-arnd@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'security/security.c')
0 files changed, 0 insertions, 0 deletions