aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWang Long <long.wanglong@huawei.com>2015-03-03 03:50:38 +0000
committerAlex Shi <alex.shi@linaro.org>2015-12-16 15:29:28 +0800
commitd7cef9b635dddb39973d8f4cacca00cd8636c3ac (patch)
treeb2d51ef5b79a104d2defe95802fca081a7ccb599
parentf04bc3d3946106add27523edc7f379dff55a0d2d (diff)
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> (cherry picked from commit 649022e08e4798ffb6e9b11c56ee6b2c62465d11) Signed-off-by: Alex Shi <alex.shi@linaro.org>
-rw-r--r--drivers/of/unittest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 9a30d79260c3..764a0e967266 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -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");