of/unittest: Fix the wrong expected value in of_selftest_property_string
authorWang Long <long.wanglong@huawei.com>
Tue, 3 Mar 2015 03:50:38 +0000 (03:50 +0000)
committerRob Herring <robh@kernel.org>
Tue, 10 Mar 2015 15:34:34 +0000 (10:34 -0500)
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>
drivers/of/unittest.c

index ee99028447ad049c6ccf1ba34d2123758a4d8e45..ac1a834f828fd805e850305b9fc0ad6117093fee 100644 (file)
@@ -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");