diff options
author | Arnd Bergmann <[email protected]> | 2017-06-21 23:49:54 +0200 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2017-06-22 00:04:26 +0200 |
commit | b7dcc4eacc45263ac5d3a0bd78c64e9ff7c94c13 (patch) | |
tree | 715095fb3cbc4e21d59acf6f6fcfafdf59369f23 /tools/perf/util/trace-event-scripting.c | |
parent | 17d9d6875ce89c0c98bb54d4d5649efb22986bf3 (diff) |
clocksource/drivers: Fix uninitialized variable use in timer_of_init
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.
[ tglx: Get rid of the silly backwards goto while at it ]
Fixes: dc11bae78529 ("clocksource/drivers: Add timer-of common init routine")
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions