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: NJohn Ogness <john.ogness@linutronix.de> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
Showing
想要评论请 注册 或 登录