The patch titled gpiolib: gpio_request_one(): add missing gpio_free() has been added to the -mm tree. Its filename is gpiolib-gpio_request_one-add-missing-gpio_free.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: gpiolib: gpio_request_one(): add missing gpio_free() From: Aaro Koskinen <aaro.koskinen@xxxxxxxxx> If GPIO request succeeds, but configuration fails, it should be released. Signed-off-by: Aaro Koskinen <aaro.koskinen@xxxxxxxxx> Acked-by: Eric Miao <eric.miao@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/gpio/gpiolib.c | 3 +++ 1 file changed, 3 insertions(+) diff -puN drivers/gpio/gpiolib.c~gpiolib-gpio_request_one-add-missing-gpio_free drivers/gpio/gpiolib.c --- a/drivers/gpio/gpiolib.c~gpiolib-gpio_request_one-add-missing-gpio_free +++ a/drivers/gpio/gpiolib.c @@ -1281,6 +1281,9 @@ int gpio_request_one(unsigned gpio, unsi err = gpio_direction_output(gpio, (flags & GPIOF_INIT_HIGH) ? 1 : 0); + if (err) + gpio_free(gpio); + return err; } EXPORT_SYMBOL_GPL(gpio_request_one); _ Patches currently in -mm which might be from aaro.koskinen@xxxxxxxxx are linux-next.patch gpiolib-gpio_request_one-add-missing-gpio_free.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html