Skip to content
Commit 1b8897c6 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt Committed by Tom Rini
Browse files

test: fix test/dm/regmap.c



regmap_read() only fills the first two bytes of val. The last two bytes are
random data from the stack. This means the test will fail randomly.

For low endian systems we could simply initialize val to 0 and get correct
results. But tests should not depend on endianness. So let's use a pointer
conversion instead.

Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent fd90aca3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment