diff --git a/drivers/of/selftest.c b/drivers/of/selftest.c index 11b873c54a776c5fd819d05875fce54b6d00f9ce..e6c14dc400e9cdae459c15df6e2e10e1168e5396 100644 --- a/drivers/of/selftest.c +++ b/drivers/of/selftest.c @@ -896,7 +896,7 @@ static void selftest_data_remove(void) return; } - while (last_node_index >= 0) { + while (last_node_index-- > 0) { if (nodes[last_node_index]) { np = of_find_node_by_path(nodes[last_node_index]->full_name); if (strcmp(np->full_name, "/aliases") != 0) { @@ -908,7 +908,6 @@ static void selftest_data_remove(void) } } } - last_node_index--; } }