From 0bebb361e467ab9d9a790523fede2f32272444d9 Mon Sep 17 00:00:00 2001 From: Ryan Mallon Date: Mon, 22 Oct 2012 11:39:12 +1100 Subject: [PATCH] gpiolib: Refactor gpio_export commit fc4e2514995d9cd7f3e1a67098ce65d72acf8ec7 upstream. 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. Signed-off-by: Ryan Mallon Signed-off-by: Linus Walleij Signed-off-by: Ben Hutchings --- Reading git-format-patch failed