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

Re: [PATCH] xen: add missing free_irq() in error path


  • To: ruanjinjie <ruanjinjie@xxxxxxxxxx>
  • From: Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>
  • Date: Mon, 14 Nov 2022 10:45:54 +0000
  • Accept-language: en-US, ru-RU
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fevBkTPNXeMFVaX0MKbOLarAmh6rSiRFVTzDzhoa4gA=; b=cB70QAcHPP+KvQFn3TS6Pgd7WbmPPKoiH5I2R/wyNvBu7bxsW0C+2oe5hnqAeHL2yAijNbz35e/Iqbq+HuUL5P0aAb9qiKlnzzX4n0oQB5S+v6pHRYxzVNY4I6rvSs45Z73iZEnhnuHWT6+luPe81ScXoAq6qj+T3Fim2sZA899g4ZsagOqkEUplYQda1k8NSl9Nrhn4paPeTIh0w7On85gs8CRG60fc2hnZtgOSwxIptwxcbG2sGhvDKEVPD9y4tsPW4ioo3cxbFahpRxoqpyc9sAqW4Z+vmoBMAMWWlIsnbvy9lfOOmuwn7afzusvq5XkKk7rVBBatGJ86rFyX/Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aGw3raqRN56WFwiPDnIPo2p7nQFNU0xUyTLFddlYixNLeaakbJrGMHRgpOLxwjBnjbag2smnx9W+dePT39KONByhlDzgGMs98cPxzJW24wTYNotgePglu3OqC2yluWo1xh3/DGjeN8S+4+hGnAPno8QqAX4+UpNakycixVQ4bMiV9qb5l7Al3IsUwgywkmiz1HJx+i5g2p/WXhiaYke24yGJ6JxAZERpcuyJZLCy2y6oo1NC/IplmNkIdNeV+3bIw3bW8YLhwPaoieOb8A47r+RIUP4AbirNJtl5ruD4aA1keTYvv15Aw2SVWsNrwbJPflZsOijUwqmn3p/9SlEW/w==
  • Cc: "jgross@xxxxxxxx" <jgross@xxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 14 Nov 2022 10:47:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHY9/gpVHEumnLn90aQTNX0N6Gi5K4+PJAA
  • Thread-topic: [PATCH] xen: add missing free_irq() in error path

On 14.11.22 09:07, ruanjinjie wrote:

Hello


> free_irq() is missing in case of error, fix that.
>
> Signed-off-by: ruanjinjie <ruanjinjie@xxxxxxxxxx>


Nit: neither subject nor description mentions which subsystem current 
patch targets.

I would add "xen-platform:" or "xen/platform-pci:" at least.


Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>

Thanks.

> ---
>   drivers/xen/platform-pci.c | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
> index 18f0ed8b1f93..6ebd819338ec 100644
> --- a/drivers/xen/platform-pci.c
> +++ b/drivers/xen/platform-pci.c
> @@ -144,7 +144,7 @@ static int platform_pci_probe(struct pci_dev *pdev,
>               if (ret) {
>                       dev_warn(&pdev->dev, "Unable to set the evtchn callback 
> "
>                                        "err=%d\n", ret);
> -                     goto out;
> +                     goto irq_out;
>               }
>       }
>   
> @@ -152,13 +152,16 @@ static int platform_pci_probe(struct pci_dev *pdev,
>       grant_frames = alloc_xen_mmio(PAGE_SIZE * max_nr_gframes);
>       ret = gnttab_setup_auto_xlat_frames(grant_frames);
>       if (ret)
> -             goto out;
> +             goto irq_out;
>       ret = gnttab_init();
>       if (ret)
>               goto grant_out;
>       return 0;
>   grant_out:
>       gnttab_free_auto_xlat_frames();
> +irq_out:
> +     if (!xen_have_vector_callback)
> +             free_irq(pdev->irq, pdev);
>   out:
>       pci_release_region(pdev, 0);
>   mem_out:

-- 
Regards,

Oleksandr Tyshchenko

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.