diff options
| author | Arnd Bergmann <[email protected]> | 2021-01-05 14:52:45 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2021-01-07 16:57:32 +0100 |
| commit | 662d82cf39ff60df33b6af6c8da71e900e65350a (patch) | |
| tree | 2885c253dbc8da7535e4171a5bdc4134f469695e /tools/perf/scripts/python/compaction-times.py | |
| parent | 04dfd7273398e7321b50c11311e303a9af2f30f9 (diff) | |
staging: vchiq: fix uninitialized variable copy
Smatch found a local variable that can get copied to another
local variable without an initializion in the error case:
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1056 vchiq_get_user_ptr() error: uninitialized symbol 'ptr'.
This seems harmless, as the function should normally get inlined, with
the output directly written or not. In any case, the uninitialized data
is never used after get_user() fails.
As Dan mentions, it could still trigger an UBSAN runtime error, and it
is of course a bad idea to copy uninitialized variables, so just
bail out early.
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/compaction-times.py')
0 files changed, 0 insertions, 0 deletions