RE: [PATCH v2 2/3] ep93xx: IDE driver platform support code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, April 04, 2012 1:41 AM, Rafal Prylowski wrote:
> On 2012-04-03 19:41, H Hartley Sweeten wrote:
> [not related to my patch, but ep93xx keypad]:
> Isn't ep93xx_keypad_acquire_gpio be more correct if we apply the following patch:
>
> 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));
>  	}
>
> This way we don't double free EP93XX_GPIO_LINE_C(i), and don't free lines which were not
> successfully acquired (I noticed this when writing my patch, which is based on
> ep93xx_keypad_acquire/release_gpio).

You are correct... ;-)

Care to submit an actual patch?

Regards,
Hartley
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux