Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 716e1d49 authored by Frank Rowand's avatar Frank Rowand Committed by Grant Likely
Browse files

of/unittest: early return from test skips tests



Fix bugs pointed out by checkpatch: Mis-coding of two if statements
caused early return from function.

Number of tests completed increased from 102 to 107.
Number of tests failed increased from 0 to 2.

Signed-off-by: default avatarFrank Rowand <frank.rowand@sonymobile.com>
Signed-off-by: default avatarGrant Likely <grant.likely@linaro.org>
parent c8547119
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -782,12 +782,14 @@ static void __init of_selftest_platform_populate(void)
	irq = platform_get_irq(pdev, 0);
	selftest(irq < 0 && irq != -EPROBE_DEFER, "device parsing error failed - %d\n", irq);

	if (selftest(np = of_find_node_by_path("/testcase-data/platform-tests"),
		     "No testcase data in device tree\n"));
	np = of_find_node_by_path("/testcase-data/platform-tests");
	selftest(np, "No testcase data in device tree\n");
	if (!np)
		return;

	if (selftest(!(rc = device_register(&test_bus)),
		     "testbus registration failed; rc=%i\n", rc));
	rc = device_register(&test_bus);
	selftest(!rc, "testbus registration failed; rc=%i\n", rc);
	if (rc)
		return;

	for_each_child_of_node(np, child) {