Skip to content
Commit bbd050af authored by John Ogness's avatar John Ogness Committed by Grant Likely
Browse files

spi/i.MX: fix broken error handling for gpio_request



i.MX35-provided chipselects are represented using negative numbers. If
gpio_request() fails and the previous chipselect was a negative number,
the while loop is endless (i is never decremented).

Also, the error loop would never call gpio_free on chipselect[0].

And finally, the error message was missing an endline.

Signed-off-by: default avatarJohn Ogness <john.ogness@linutronix.de>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent ce1807b2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment