Re: [PATCH v2] gpiolib: Refactor gpio_export

From: Linus Walleij
Date: Mon Oct 22 2012 - 18:13:40 EST

On Mon, Oct 22, 2012 at 2:39 AM, Ryan Mallon <rmallon@xxxxxxxxx> 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 slightly longer, but significantly
> reduces the nesting and number of split lines and makes the code easier
> to read.

Splendid, patch applied!

> Signed-off-by: Ryan Mallon

Interesting that you sign off without an email address, I just added it
thinking it was a mistake.

Linus Walleij
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at