From: Ryan Mallon Date: Mon, 22 Oct 2012 00:39:12 +0000 (+1100) Subject: gpiolib: Refactor gpio_export X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~87^2~27 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc4e2514995d9cd7f3e1a67098ce65d72acf8ec7;p=pandora-kernel.git gpiolib: Refactor gpio_export 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 --- Reading git-diff-tree failed