Skip to content

Commit

Permalink
of/selftest: Fix GPIOs selftest to cover the 7th case
Browse files Browse the repository at this point in the history
The of_gpio_named_count() self test doesn't hit the out-of-range
condition even though it is coded. Fix the bug by increasing the for
loop range by one.

Reported-by: Andreas Larsson <andreas@gaisler.com>
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Grant Likely committed Feb 13, 2013
1 parent c31a0c0 commit f7f951c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/of/selftest.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static void __init of_selftest_parse_phandle_with_args(void)
return;
}

for (i = 0; i < 7; i++) {
for (i = 0; i < 8; i++) {
bool passed = true;
rc = of_parse_phandle_with_args(np, "phandle-list",
"#phandle-cells", i, &args);
Expand Down

0 comments on commit f7f951c

Please sign in to comment.