Skip to content

Commit

Permalink
of/unittest: Fix the wrong expected value in of_selftest_property_string
Browse files Browse the repository at this point in the history
This patch fix the wrong expected value of of_property_match_string
in of_selftest_property_string.

Signed-off-by: Wang Long <[email protected]>
Signed-off-by: Rob Herring <[email protected]>
  • Loading branch information
datawolf authored and robherring committed Mar 10, 2015
1 parent dc6a945 commit 649022e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/of/unittest.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,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");
Expand Down

0 comments on commit 649022e

Please sign in to comment.