Skip to content
Commit e2f608be authored by Linus Walleij's avatar Linus Walleij
Browse files

gpio: make the iterator point to last handle



When initializing the GPIO handles, we use the iterator (i)
to back off if something goes wrong. But since the iterator
is also used after we pass the loop, we must decrement by
one after exiting the loop so that we point at the last
element in the array.

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Walter Harms <wharms@bfs.de>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent bc0207a5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment