get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/66555/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 66555,
    "url": "http://patches.dpdk.org/api/patches/66555/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/158396396706.5601.17691989521568973524.stgit@gimli.home/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<158396396706.5601.17691989521568973524.stgit@gimli.home>",
    "list_archive_url": "https://inbox.dpdk.org/dev/158396396706.5601.17691989521568973524.stgit@gimli.home",
    "date": "2020-03-11T21:59:27",
    "name": "[v3,7/7] vfio/pci: Cleanup .probe() exit paths",
    "commit_ref": null,
    "pull_url": null,
    "state": "not-applicable",
    "archived": true,
    "hash": "b71471adae19cf5beb0e7720eadb23dc0e50283e",
    "submitter": {
        "id": 391,
        "url": "http://patches.dpdk.org/api/people/391/?format=api",
        "name": "Alex Williamson",
        "email": "alex.williamson@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/158396396706.5601.17691989521568973524.stgit@gimli.home/mbox/",
    "series": [
        {
            "id": 8887,
            "url": "http://patches.dpdk.org/api/series/8887/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8887",
            "date": "2020-03-11T21:58:25",
            "name": "vfio/pci: SR-IOV support",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/8887/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/66555/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/66555/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 81CD2A056D;\n\tWed, 11 Mar 2020 22:59:47 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4361D1C001;\n\tWed, 11 Mar 2020 22:59:38 +0100 (CET)",
            "from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com\n [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id B6E143B5\n for <dev@dpdk.org>; Wed, 11 Mar 2020 22:59:36 +0100 (CET)",
            "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-472-qtDruae_OwS7l1nxV3b4SA-1; Wed, 11 Mar 2020 17:59:32 -0400",
            "from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com\n [10.5.11.16])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AFCE3800D4E;\n Wed, 11 Mar 2020 21:59:30 +0000 (UTC)",
            "from gimli.home (ovpn-116-28.phx2.redhat.com [10.3.116.28])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 76DF25C1C3;\n Wed, 11 Mar 2020 21:59:27 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1583963976;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=2coe0K/YOGRmQlEEVhDLe8KeocxzDyTxw0isd+7I5PM=;\n b=G6oC3bB63+GZamm8Sph/xvechIwfc3kH5OqJLkJlOOshUhH9+dygvc6hKRC30lzm8pe7AY\n kAiaBp3bvUOhMBaDBdXe2A0735f2UBcjNLSC9RlSgfJhxgaQAH0yN4tekVoYOB2RD14dPV\n Go/Wy+sWl+QVCaxc8Ydgq7U0iQ4xKbM=",
        "X-MC-Unique": "qtDruae_OwS7l1nxV3b4SA-1",
        "From": "Alex Williamson <alex.williamson@redhat.com>",
        "To": "kvm@vger.kernel.org",
        "Cc": "linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, dev@dpdk.org,\n mtosatti@redhat.com, thomas@monjalon.net, bluca@debian.org,\n jerinjacobk@gmail.com, bruce.richardson@intel.com, cohuck@redhat.com,\n kevin.tian@intel.com",
        "Date": "Wed, 11 Mar 2020 15:59:27 -0600",
        "Message-ID": "<158396396706.5601.17691989521568973524.stgit@gimli.home>",
        "In-Reply-To": "<158396044753.5601.14804870681174789709.stgit@gimli.home>",
        "References": "<158396044753.5601.14804870681174789709.stgit@gimli.home>",
        "User-Agent": "StGit/0.19-dirty",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.16",
        "Subject": "[dpdk-dev] [PATCH v3 7/7] vfio/pci: Cleanup .probe() exit paths",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The cleanup is getting a tad long.\n\nSigned-off-by: Alex Williamson <alex.williamson@redhat.com>\n---\n drivers/vfio/pci/vfio_pci.c |   54 ++++++++++++++++++++-----------------------\n 1 file changed, 25 insertions(+), 29 deletions(-)",
    "diff": "diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c\nindex af1ba9867201..6c6b37b5c04e 100644\n--- a/drivers/vfio/pci/vfio_pci.c\n+++ b/drivers/vfio/pci/vfio_pci.c\n@@ -1598,8 +1598,8 @@ static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)\n \n \tvdev = kzalloc(sizeof(*vdev), GFP_KERNEL);\n \tif (!vdev) {\n-\t\tvfio_iommu_group_put(group, &pdev->dev);\n-\t\treturn -ENOMEM;\n+\t\tret = -ENOMEM;\n+\t\tgoto out_group_put;\n \t}\n \n \tvdev->pdev = pdev;\n@@ -1610,43 +1610,27 @@ static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)\n \tINIT_LIST_HEAD(&vdev->ioeventfds_list);\n \n \tret = vfio_add_group_dev(&pdev->dev, &vfio_pci_ops, vdev);\n-\tif (ret) {\n-\t\tvfio_iommu_group_put(group, &pdev->dev);\n-\t\tkfree(vdev);\n-\t\treturn ret;\n-\t}\n+\tif (ret)\n+\t\tgoto out_free;\n \n \tret = vfio_pci_reflck_attach(vdev);\n-\tif (ret) {\n-\t\tvfio_del_group_dev(&pdev->dev);\n-\t\tvfio_iommu_group_put(group, &pdev->dev);\n-\t\tkfree(vdev);\n-\t\treturn ret;\n-\t}\n+\tif (ret)\n+\t\tgoto out_del_group_dev;\n \n \tif (pdev->is_physfn) {\n \t\tvdev->vf_token = kzalloc(sizeof(*vdev->vf_token), GFP_KERNEL);\n \t\tif (!vdev->vf_token) {\n-\t\t\tvfio_pci_reflck_put(vdev->reflck);\n-\t\t\tvfio_del_group_dev(&pdev->dev);\n-\t\t\tvfio_iommu_group_put(group, &pdev->dev);\n-\t\t\tkfree(vdev);\n-\t\t\treturn -ENOMEM;\n-\t\t}\n-\n-\t\tvdev->nb.notifier_call = vfio_pci_bus_notifier;\n-\t\tret = bus_register_notifier(&pci_bus_type, &vdev->nb);\n-\t\tif (ret) {\n-\t\t\tkfree(vdev->vf_token);\n-\t\t\tvfio_pci_reflck_put(vdev->reflck);\n-\t\t\tvfio_del_group_dev(&pdev->dev);\n-\t\t\tvfio_iommu_group_put(group, &pdev->dev);\n-\t\t\tkfree(vdev);\n-\t\t\treturn ret;\n+\t\t\tret = -ENOMEM;\n+\t\t\tgoto out_reflck;\n \t\t}\n \n \t\tmutex_init(&vdev->vf_token->lock);\n \t\tuuid_gen(&vdev->vf_token->uuid);\n+\n+\t\tvdev->nb.notifier_call = vfio_pci_bus_notifier;\n+\t\tret = bus_register_notifier(&pci_bus_type, &vdev->nb);\n+\t\tif (ret)\n+\t\t\tgoto out_vf_token;\n \t}\n \n \tif (vfio_pci_is_vga(pdev)) {\n@@ -1672,6 +1656,18 @@ static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)\n \t}\n \n \treturn ret;\n+\n+out_vf_token:\n+\tkfree(vdev->vf_token);\n+out_reflck:\n+\tvfio_pci_reflck_put(vdev->reflck);\n+out_del_group_dev:\n+\tvfio_del_group_dev(&pdev->dev);\n+out_free:\n+\tkfree(vdev);\n+out_group_put:\n+\tvfio_iommu_group_put(group, &pdev->dev);\n+\treturn ret;\n }\n \n static void vfio_pci_remove(struct pci_dev *pdev)\n",
    "prefixes": [
        "v3",
        "7/7"
    ]
}