devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: unittest: fix an error test in of_unittest_overlay_8()
@ 2018-03-07  6:18 Dan Carpenter
  2018-03-07 19:09 ` Frank Rowand
  2018-03-08  2:13 ` Rob Herring
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2018-03-07  6:18 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand; +Cc: devicetree, kernel-janitors

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>

diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index ca5e86dadae2..b233f170b2ec 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -1666,8 +1666,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;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-08  2:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-07  6:18 [PATCH] of: unittest: fix an error test in of_unittest_overlay_8() Dan Carpenter
2018-03-07 19:09 ` Frank Rowand
2018-03-07 20:13   ` Frank Rowand
2018-03-08  2:13 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).