Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753080AbdCFE7y (ORCPT ); Sun, 5 Mar 2017 23:59:54 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:27608 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752986AbdCFE7m (ORCPT ); Sun, 5 Mar 2017 23:59:42 -0500 Subject: Re: [PATCH 08/12] gpio: davinci: use devm_irq_alloc_descs() To: Bartosz Golaszewski , Linus Walleij , Alexandre Courbot , Bamvor Jian Zhang , Grygorii Strashko , Santosh Shilimkar , Kevin Hilman , Robert Jarzmik References: <1488644620-11488-1-git-send-email-bgolaszewski@baylibre.com> <1488644620-11488-9-git-send-email-bgolaszewski@baylibre.com> CC: , , , Thomas Gleixner , Marc Zyngier From: Keerthy Message-ID: <70d9fed2-1378-66a4-4640-dd93aae162b6@ti.com> Date: Mon, 6 Mar 2017 10:29:18 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <1488644620-11488-9-git-send-email-bgolaszewski@baylibre.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 923 Lines: 28 On Saturday 04 March 2017 09:53 PM, Bartosz Golaszewski wrote: > This driver never frees the interrupt descriptors it allocates. Fix > it by using the resource managed version of irq_alloc_descs(). > Acked-by: Keerthy > Signed-off-by: Bartosz Golaszewski > --- > drivers/gpio/gpio-davinci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c > index 72f49d1..ac17357 100644 > --- a/drivers/gpio/gpio-davinci.c > +++ b/drivers/gpio/gpio-davinci.c > @@ -483,7 +483,7 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev) > clk_prepare_enable(clk); > > if (!pdata->gpio_unbanked) { > - irq = irq_alloc_descs(-1, 0, ngpio, 0); > + irq = devm_irq_alloc_descs(dev, -1, 0, ngpio, 0); > if (irq < 0) { > dev_err(dev, "Couldn't allocate IRQ numbers\n"); > return irq; >