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: 39a751a4cb ("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>
This commit is contained in:
Dan Carpenter 2018-03-07 09:18:08 +03:00 committed by Rob Herring
parent 0b3ce78e90
commit bdb7013df9

View File

@ -1696,8 +1696,7 @@ static void __init of_unittest_overlay_8(void)
overlay_name = overlay_name_from_nr(overlay_nr + i);
ret = overlay_data_apply(overlay_name, &ovcs_id);
if (ret < 0) {
if (!overlay_data_apply(overlay_name, &ovcs_id)) {
unittest(0, "could not apply overlay \"%s\"\n",
overlay_name);
return;