From: Krzysztof Kozlowski Date: Mon, 3 Apr 2023 09:40:17 +0000 (+0200) Subject: clocksource/drivers/exynos_mct: Explicitly return 0 for shared timer X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=fd3f088f35f610a7ee3045b7d172b362342e43c6;p=linux.git clocksource/drivers/exynos_mct: Explicitly return 0 for shared timer For a shared timers, the mct_init_dt() should not initialize the clock even with global comparator. This is not an error, thus the function should simply return 0, not 'ret'. This also fixes smatch warning: drivers/clocksource/exynos_mct.c:635 mct_init_dt() warn: missing error code? 'ret' Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/202304021446.46XVKag0-lkp@intel.com/ Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vincent Whitchurch Reviewed-by: Alim Akhtar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230403094017.9556-1-krzysztof.kozlowski@linaro.org --- diff --git a/drivers/clocksource/exynos_mct.c b/drivers/clocksource/exynos_mct.c index bfd60093ee1c9..ef8cb1b71be4a 100644 --- a/drivers/clocksource/exynos_mct.c +++ b/drivers/clocksource/exynos_mct.c @@ -682,7 +682,7 @@ static int __init mct_init_dt(struct device_node *np, unsigned int int_type) * processor cannot use the global comparator. */ if (frc_shared) - return ret; + return 0; return exynos4_clockevent_init(); }