[PATCH] arm: ep93xx: Don't try to release not acquired GPIO lines

Ryan Mallon rmallon at gmail.com
Tue Apr 10 22:09:14 EDT 2012


On 06/04/12 02:39, H Hartley Sweeten wrote:

> On Thursday, April 05, 2012 4:44 AM, Rafal Prylowski wrote:
>> Fail path of ep93xx_keypad_acquire_gpio() tries to release
>> GPIO lines not acquired successfully before. Fix this.
>>
>> Signed-off-by: Rafal Prylowski <prylowski at metasoft.pl>
>> Cc: H Hartley Sweeten <hsweeten at visionengravers.com>
>> Cc: Ryan Mallon <rmallon at gmail.com>
>>
>> ---
>> Patch applies to v3.4rc1.
>>
>>  arch/arm/mach-ep93xx/core.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Index: linux-2.6/arch/arm/mach-ep93xx/core.c
>> ===================================================================
>> --- linux-2.6.orig/arch/arm/mach-ep93xx/core.c
>> +++ linux-2.6/arch/arm/mach-ep93xx/core.c
>> @@ -734,7 +734,7 @@ int ep93xx_keypad_acquire_gpio(struct pl
>>  fail_gpio_d:
>>  	gpio_free(EP93XX_GPIO_LINE_C(i));
>>  fail_gpio_c:
>> -	for ( ; i >= 0; --i) {
>> +	for (--i; i >= 0; --i) {
>>  		gpio_free(EP93XX_GPIO_LINE_C(i));
>>  		gpio_free(EP93XX_GPIO_LINE_D(i));
>>  	}
> 
> Acked-by: H Hartley Sweeten <hsweeten at visionengravers.com>


Applied to ep93xx-fixes on https://github.com/RyanMallon/linux-ep93xx

Thanks,
~Ryan




More information about the linux-arm-kernel mailing list