Commit 87666a7d authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman
Browse files

kselftest: vDSO: Fix accumulation of uninitialized ret when CLOCK_REALTIME is undefined



[ Upstream commit 375b9ff5 ]

In the unlikely case that CLOCK_REALTIME is not defined, variable ret is
not initialized and further accumulation of return values to ret can leave
ret in an undefined state. Fix this by initialized ret to zero and changing
the assignment of ret to an accumulation for the CLOCK_REALTIME case.

Fixes: 03f55c79 ("kselftest: Extend vDSO selftest to clock_getres")
Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
Reviewed-by: default avatarVincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f766d45a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment