diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2018-03-07 01:18:08 -0500 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2018-03-07 21:12:05 -0500 |
commit | bdb7013df910681f84eff27b07791d4c160cb76f (patch) | |
tree | ddf391c2c0479dd0bd41f115ccacc1e939a360d2 /drivers/of/unittest.c | |
parent | 0b3ce78e90fc66c50a944320d6e39fa6fdb46cdf (diff) |
of: unittest: fix an error test in of_unittest_overlay_8()
We changed this from of_overlay_apply() to overlay_data_apply(). The
overlay_data_apply() function returns 1 on success and 0 on error so
the check for less than zero needs to be updated.
Fixes: 39a751a4cb7e ("of: change overlay apply input data from unflattened to FDT")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/unittest.c')
-rw-r--r-- | drivers/of/unittest.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 62c8a8b8af2d..20ffbedac524 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c | |||
@@ -1696,8 +1696,7 @@ static void __init of_unittest_overlay_8(void) | |||
1696 | 1696 | ||
1697 | overlay_name = overlay_name_from_nr(overlay_nr + i); | 1697 | overlay_name = overlay_name_from_nr(overlay_nr + i); |
1698 | 1698 | ||
1699 | ret = overlay_data_apply(overlay_name, &ovcs_id); | 1699 | if (!overlay_data_apply(overlay_name, &ovcs_id)) { |
1700 | if (ret < 0) { | ||
1701 | unittest(0, "could not apply overlay \"%s\"\n", | 1700 | unittest(0, "could not apply overlay \"%s\"\n", |
1702 | overlay_name); | 1701 | overlay_name); |
1703 | return; | 1702 | return; |