Skip to content

Commit fd3f088

Browse files
krzkdlezcano
authored andcommitted
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 <lkp@intel.com> Reported-by: Dan Carpenter <error27@gmail.com> Link: https://lore.kernel.org/r/202304021446.46XVKag0-lkp@intel.com/ Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230403094017.9556-1-krzysztof.kozlowski@linaro.org
1 parent f7abf14 commit fd3f088

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/clocksource/exynos_mct.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ static int __init mct_init_dt(struct device_node *np, unsigned int int_type)
682682
* processor cannot use the global comparator.
683683
*/
684684
if (frc_shared)
685-
return ret;
685+
return 0;
686686

687687
return exynos4_clockevent_init();
688688
}

0 commit comments

Comments
 (0)