diff options
author | Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> | 2018-12-04 21:30:08 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-12-12 12:14:21 -0500 |
commit | b0b1768e1b138204ab07d46cbe7d24d3770f0a12 (patch) | |
tree | 96679e26d37db2ee4401cf799c8d20eb3dc36d9f /test/lib/hexdump.c | |
parent | 03fb0958c9090eb3add089cb9f5a8a5ecb30ddf6 (diff) |
test: hexdump: fix misplaced return
One of the hexdump tests in test/lib/hexdump.c returns right at the
start of the function without testing anything.
Fix this by moving the 'return 0;' statement to the end of the function.
Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/lib/hexdump.c')
-rw-r--r-- | test/lib/hexdump.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lib/hexdump.c b/test/lib/hexdump.c index e8b3e566e0..567b57686a 100644 --- a/test/lib/hexdump.c +++ b/test/lib/hexdump.c @@ -11,8 +11,6 @@ static int lib_test_hex_to_bin(struct unit_test_state *uts) { - return 0; - ut_asserteq(0x0, hex_to_bin('0')); ut_asserteq(0x1, hex_to_bin('1')); ut_asserteq(0x2, hex_to_bin('2')); @@ -30,6 +28,8 @@ static int lib_test_hex_to_bin(struct unit_test_state *uts) ut_asserteq(0xe, hex_to_bin('e')); ut_asserteq(0xf, hex_to_bin('f')); ut_asserteq(-1, hex_to_bin('g')); + + return 0; } DM_TEST(lib_test_hex_to_bin, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT); |