From: Dan Carpenter Date: Wed, 7 Mar 2018 06:18:08 +0000 (+0300) Subject: of: unittest: fix an error test in of_unittest_overlay_8() X-Git-Tag: v4.17-rc1~106^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bdb7013df910681f84eff27b07791d4c160cb76f;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Frank Rowand Signed-off-by: Rob Herring --- diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 62c8a8b8af2d5..20ffbedac524b 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -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;