From: Ryan Mallon Date: Mon, 22 Oct 2012 00:39:12 +0000 (+1100) Subject: gpiolib: Refactor gpio_export X-Git-Tag: v3.2.67~40 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0bebb361e467ab9d9a790523fede2f32272444d9;p=pandora-kernel.git 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-diff-tree failed