Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7cef9b6 authored by Wang Long's avatar Wang Long Committed by Alex Shi
Browse files

of/unittest: Fix the wrong expected value in of_selftest_property_string



This patch fix the wrong expected value of of_property_match_string
in of_selftest_property_string.

Signed-off-by: default avatarWang Long <long.wanglong@huawei.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
(cherry picked from commit 649022e08e4798ffb6e9b11c56ee6b2c62465d11)
Signed-off-by: default avatarAlex Shi <alex.shi@linaro.org>
parent f04bc3d3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -375,9 +375,9 @@ static void __init of_selftest_property_string(void)
	rc = of_property_match_string(np, "phandle-list-names", "first");
	selftest(rc == 0, "first expected:0 got:%i\n", rc);
	rc = of_property_match_string(np, "phandle-list-names", "second");
	selftest(rc == 1, "second expected:0 got:%i\n", rc);
	selftest(rc == 1, "second expected:1 got:%i\n", rc);
	rc = of_property_match_string(np, "phandle-list-names", "third");
	selftest(rc == 2, "third expected:0 got:%i\n", rc);
	selftest(rc == 2, "third expected:2 got:%i\n", rc);
	rc = of_property_match_string(np, "phandle-list-names", "fourth");
	selftest(rc == -ENODATA, "unmatched string; rc=%i\n", rc);
	rc = of_property_match_string(np, "missing-property", "blah");