summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-clps711x.c
diff options
context:
space:
mode:
authorRyan Mallon <rmallon@gmail.com>2012-10-22 02:39:12 +0200
committerLinus Walleij <linus.walleij@linaro.org>2012-10-23 00:13:36 +0200
commitfc4e2514995d9cd7f3e1a67098ce65d72acf8ec7 (patch)
tree05cb8ff2fbf178fd5282e970173cac05f6e6c132 /drivers/gpio/gpio-clps711x.c
parentGPIO: vt8500: Add extended gpio bank for WM8505/WM8650 (diff)
downloadlinux-fc4e2514995d9cd7f3e1a67098ce65d72acf8ec7.tar.xz
linux-fc4e2514995d9cd7f3e1a67098ce65d72acf8ec7.zip
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 <rmallon@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-clps711x.c')
0 files changed, 0 insertions, 0 deletions