get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 554,
    "url": "http://patchwork.ozlabs.org/api/patches/554/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1221773874-3273-1-git-send-email-afleming@freescale.com/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api",
        "name": "Linux network development",
        "link_name": "netdev",
        "list_id": "netdev.vger.kernel.org",
        "list_email": "netdev@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1221773874-3273-1-git-send-email-afleming@freescale.com>",
    "list_archive_url": null,
    "date": "2008-09-18T21:37:54",
    "name": "gianfar: Free/iounmap memory after an error in mii bus initialization",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "4c037767e1138e5ef4ca35d6c1278c9be09b5dbc",
    "submitter": {
        "id": 280,
        "url": "http://patchwork.ozlabs.org/api/people/280/?format=api",
        "name": "Andy Fleming",
        "email": "afleming@freescale.com"
    },
    "delegate": {
        "id": 36,
        "url": "http://patchwork.ozlabs.org/api/users/36/?format=api",
        "username": "jgarzik",
        "first_name": "Jeff",
        "last_name": "Garzik",
        "email": "jgarzik@pobox.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/1221773874-3273-1-git-send-email-afleming@freescale.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/554/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/554/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.176.167])\n\tby ozlabs.org (Postfix) with ESMTP id B960FDDF34\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 19 Sep 2008 07:38:05 +1000 (EST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1754751AbYIRViA (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 18 Sep 2008 17:38:00 -0400",
            "(majordomo@vger.kernel.org) by vger.kernel.org id S1754749AbYIRViA\n\t(ORCPT <rfc822; netdev-outgoing>); Thu, 18 Sep 2008 17:38:00 -0400",
            "from de01egw01.freescale.net ([192.88.165.102]:37580 \"EHLO\n\tde01egw01.freescale.net\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1754631AbYIRVh7 (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 18 Sep 2008 17:37:59 -0400",
            "from de01smr02.am.mot.com (de01smr02.freescale.net [10.208.0.151])\n\tby de01egw01.freescale.net (8.12.11/az33egw01) with ESMTP id\n\tm8ILbtvx007264\n\tfor <netdev@vger.kernel.org>; Thu, 18 Sep 2008 14:37:56 -0700 (MST)",
            "from ld0175-tx32.am.freescale.net (ld0175-tx32.am.freescale.net\n\t[10.82.19.125])\n\tby de01smr02.am.mot.com (8.13.1/8.13.0) with ESMTP id m8ILbsOt006512\n\tfor <netdev@vger.kernel.org>; Thu, 18 Sep 2008 16:37:55 -0500 (CDT)",
            "by ld0175-tx32.am.freescale.net (Postfix, from userid 12005171)\n\tid 6424124ED2; Thu, 18 Sep 2008 16:37:54 -0500 (CDT)"
        ],
        "From": "Andy Fleming <afleming@freescale.com>",
        "To": "jeff@garzik.org",
        "Cc": "netdev@vger.kernel.org, danielm77@spray.se,\n\takpm@linux-foundation.org, Andy Fleming <afleming@freescale.com>",
        "Subject": "[PATCH] gianfar: Free/iounmap memory after an error in mii bus\n\tinitialization",
        "Date": "Thu, 18 Sep 2008 16:37:54 -0500",
        "Message-Id": "<1221773874-3273-1-git-send-email-afleming@freescale.com>",
        "X-Mailer": "git-send-email 1.5.4.GIT",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "Recent changes to MII bus initialization code added exit points which\ndidn't free or iounmap the bus before returning.\n\nThis was reported as bug #11372\n\nSigned-off-by: Andy Fleming <afleming@freescale.com>",
    "diff": "diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c\nindex ebcfb27..4804ec1 100644\n--- a/drivers/net/gianfar_mii.c\n+++ b/drivers/net/gianfar_mii.c\n@@ -211,19 +211,21 @@ static int gfar_mdio_probe(struct device *dev)\n \tgfar_write(&enet_regs->tbipa, 0);\n \tfor (i = PHY_MAX_ADDR; i > 0; i--) {\n \t\tu32 phy_id;\n-\t\tint r;\n \n-\t\tr = get_phy_id(new_bus, i, &phy_id);\n-\t\tif (r)\n-\t\t\treturn r;\n+\t\terr = get_phy_id(new_bus, i, &phy_id);\n+\t\tif (err)\n+\t\t\tgoto bus_register_fail;\n \n \t\tif (phy_id == 0xffffffff)\n \t\t\tbreak;\n \t}\n \n \t/* The bus is full.  We don't support using 31 PHYs, sorry */\n-\tif (i == 0)\n-\t\treturn -EBUSY;\n+\tif (i == 0) {\n+\t\terr = -EBUSY;\n+\n+\t\tgoto bus_register_fail;\n+\t}\n \n \tgfar_write(&enet_regs->tbipa, i);\n \n",
    "prefixes": []
}