Skip to content

Commit 649022e

Browse files
datawolfrobherring
authored andcommitted
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: Wang Long <long.wanglong@huawei.com> Signed-off-by: Rob Herring <robh@kernel.org>
1 parent dc6a945 commit 649022e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/of/unittest.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,9 @@ static void __init of_selftest_property_string(void)
378378
rc = of_property_match_string(np, "phandle-list-names", "first");
379379
selftest(rc == 0, "first expected:0 got:%i\n", rc);
380380
rc = of_property_match_string(np, "phandle-list-names", "second");
381-
selftest(rc == 1, "second expected:0 got:%i\n", rc);
381+
selftest(rc == 1, "second expected:1 got:%i\n", rc);
382382
rc = of_property_match_string(np, "phandle-list-names", "third");
383-
selftest(rc == 2, "third expected:0 got:%i\n", rc);
383+
selftest(rc == 2, "third expected:2 got:%i\n", rc);
384384
rc = of_property_match_string(np, "phandle-list-names", "fourth");
385385
selftest(rc == -ENODATA, "unmatched string; rc=%i\n", rc);
386386
rc = of_property_match_string(np, "missing-property", "blah");

0 commit comments

Comments
 (0)