Re: [PATCH v2] gpiolib: Refactor gpio_export

2012-10-22 Thread Ryan Mallon
On 23/10/12 09:13, Linus Walleij wrote: > On Mon, Oct 22, 2012 at 2:39 AM, Ryan Mallon wrote: > >> The gpio_export function uses nested if statements and the status >> variable to handle the failure cases. This makes the function logic >> difficult to follow. Refactor the code to abort immediatel

Re: [PATCH v2] gpiolib: Refactor gpio_export

2012-10-22 Thread Linus Walleij
On Mon, Oct 22, 2012 at 2:39 AM, Ryan Mallon wrote: > The gpio_export function uses nested if statements and the status > variable to handle the failure cases. This makes the function logic > difficult to follow. Refactor the code to abort immediately on failure > using goto. This makes the code