summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/am300epd.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-03-26 10:03:03 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-03-26 10:03:03 +0000
commit938c0ace3ffb8cc2073a6d2e68fa7a6ab7cb471e (patch)
tree9257bdba52ce88ca0a0c2f6fce1f59a1eb278452 /arch/arm/mach-pxa/am300epd.c
parent16c29dafcc86024048f1dbb8349d31cb22c7c55a (diff)
parent5898eb79fb45d4fd4ce22139c168de937bfaab38 (diff)
downloadop-kernel-dev-938c0ace3ffb8cc2073a6d2e68fa7a6ab7cb471e.zip
op-kernel-dev-938c0ace3ffb8cc2073a6d2e68fa7a6ab7cb471e.tar.gz
Merge branch 'devel' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel-stable
Conflicts: arch/arm/mach-pxa/tosa.c
Diffstat (limited to 'arch/arm/mach-pxa/am300epd.c')
-rw-r--r--arch/arm/mach-pxa/am300epd.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/arm/mach-pxa/am300epd.c b/arch/arm/mach-pxa/am300epd.c
index 993d75e..fa8bad2 100644
--- a/arch/arm/mach-pxa/am300epd.c
+++ b/arch/arm/mach-pxa/am300epd.c
@@ -125,10 +125,7 @@ static int am300_init_gpio_regs(struct broadsheetfb_par *par)
if (err) {
dev_err(&am300_device->dev, "failed requesting "
"gpio %d, err=%d\n", i, err);
- while (i >= DB0_GPIO_PIN)
- gpio_free(i--);
- i = ARRAY_SIZE(gpios) - 1;
- goto err_req_gpio;
+ goto err_req_gpio2;
}
}
@@ -159,9 +156,13 @@ static int am300_init_gpio_regs(struct broadsheetfb_par *par)
return 0;
+err_req_gpio2:
+ while (--i >= DB0_GPIO_PIN)
+ gpio_free(i);
+ i = ARRAY_SIZE(gpios);
err_req_gpio:
- while (i > 0)
- gpio_free(gpios[i--]);
+ while (--i >= 0)
+ gpio_free(gpios[i]);
return err;
}
OpenPOWER on IntegriCloud