Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1672347
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] clocksource/drivers: fix uninitialized variable use in timer_of_init |
| Date | 2017-06-22 09:10 +0200 |
| Message-ID | <tV4pA-1l7-15@gated-at.bofh.it> (permalink) |
| References | <tUVPk-3BI-19@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 21/06/2017 23:49, Arnd Bergmann wrote:
> If none of the flags are set, 'ret' is uninitialized as pointed out
> by gcc:
>
> drivers/clocksource/timer-of.c: In function 'timer_of_init':
> drivers/clocksource/timer-of.c:160:9: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>
> Since calling the function without any of the flags is an error,
> set the return value to -EINVAL for that case.
>
> Fixes: dc11bae78529 ("clocksource/drivers: Add timer-of common init routine")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
Thanks for the fix!
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] clocksource/drivers: fix uninitialized variable use in timer_of_init Arnd Bergmann <arnd@arndb.de> - 2017-06-22 00:00 +0200 [tip:timers/core] clocksource/drivers: Fix uninitialized variable use in timer_of_init tip-bot for Arnd Bergmann <tipbot@zytor.com> - 2017-06-22 00:10 +0200 Re: [PATCH] clocksource/drivers: fix uninitialized variable use in timer_of_init Daniel Lezcano <daniel.lezcano@linaro.org> - 2017-06-22 09:10 +0200
csiph-web