get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2217011,
    "url": "http://patchwork.ozlabs.org/api/patches/2217011/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/uboot/patch/20260327140508.3680105-4-richard.genoud@bootlin.com/",
    "project": {
        "id": 18,
        "url": "http://patchwork.ozlabs.org/api/projects/18/?format=api",
        "name": "U-Boot",
        "link_name": "uboot",
        "list_id": "u-boot.lists.denx.de",
        "list_email": "u-boot@lists.denx.de",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260327140508.3680105-4-richard.genoud@bootlin.com>",
    "list_archive_url": null,
    "date": "2026-03-27T14:05:06",
    "name": "[v2,3/5] mtd: rawnand: sunxi: clean sunxi_nand_chip_init()",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "5436191ff1fd386f8232895baaadade32b311f17",
    "submitter": {
        "id": 88519,
        "url": "http://patchwork.ozlabs.org/api/people/88519/?format=api",
        "name": "Richard Genoud",
        "email": "richard.genoud@bootlin.com"
    },
    "delegate": {
        "id": 114289,
        "url": "http://patchwork.ozlabs.org/api/users/114289/?format=api",
        "username": "apritzel",
        "first_name": "Andre",
        "last_name": "Przywara",
        "email": "andre.przywara@arm.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/uboot/patch/20260327140508.3680105-4-richard.genoud@bootlin.com/mbox/",
    "series": [
        {
            "id": 497775,
            "url": "http://patchwork.ozlabs.org/api/series/497775/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/uboot/list/?series=497775",
            "date": "2026-03-27T14:05:03",
            "name": "mtd: rawnand: sunxi: Fix user data length for H6",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/497775/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2217011/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2217011/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<u-boot-bounces@lists.denx.de>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256\n header.s=dkim header.b=m8MzCdTp;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)",
            "phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=bootlin.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de",
            "phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=bootlin.com header.i=@bootlin.com header.b=\"m8MzCdTp\";\n\tdkim-atps=neutral",
            "phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=bootlin.com",
            "phobos.denx.de;\n spf=pass smtp.mailfrom=richard.genoud@bootlin.com"
        ],
        "Received": [
            "from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fj2Vm3rflz1y1P\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 28 Mar 2026 01:06:08 +1100 (AEDT)",
            "from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 4CAD983C14;\n\tFri, 27 Mar 2026 15:05:43 +0100 (CET)",
            "by phobos.denx.de (Postfix, from userid 109)\n id CC8AF83FE9; Fri, 27 Mar 2026 15:05:39 +0100 (CET)",
            "from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 8349D83DA7\n for <u-boot@lists.denx.de>; Fri, 27 Mar 2026 15:05:37 +0100 (CET)",
            "from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233])\n by smtpout-03.galae.net (Postfix) with ESMTPS id 0BF154E4282B;\n Fri, 27 Mar 2026 14:05:37 +0000 (UTC)",
            "from mail.galae.net (mail.galae.net [212.83.136.155])\n by smtpout-01.galae.net (Postfix) with ESMTPS id CF31060230;\n Fri, 27 Mar 2026 14:05:36 +0000 (UTC)",
            "from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon)\n with ESMTPSA id EC01010451269; Fri, 27 Mar 2026 15:05:34 +0100 (CET)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,\n SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim;\n t=1774620336; h=from:subject:date:message-id:to:cc:mime-version:\n content-transfer-encoding:in-reply-to:references;\n bh=Z7iIlbzbNAkOYN2yvM6AfIsi74NeXG3jjpKWdMs4gDQ=;\n b=m8MzCdTpXa0o7uZn7Fy2/AQcu2ihxYRkt58Aky+Zagn7kVvfwkpDCjc8rHduFgU/Q+JTxm\n ad7qMy4sLOoHWfJ35ATgi6OVk5Tb2vGTuJc8jZy66P04kJ215An7HJgrBpNNfMZwHLIvB+\n NsSK+F8PbiXZGz5+T9+72NOrj6gLd1p6qZz8MAKua4x2eOGz8W4tuynZy3npXSUOUChwqL\n uJW1vq5ICqksFVFU207rqVeZAqKl3Xxfn5UwiOgLnemmYK9s5USVp4LlbuylD/sRxv0L6P\n I94/faWRXmpKvjmQt06KELrqRbXDs+yDi7VaE5OIT/p2kImAhFPgY9rW3oQAjQ==",
        "From": "Richard Genoud <richard.genoud@bootlin.com>",
        "To": "Dario Binacchi <dario.binacchi@amarulasolutions.com>,\n Michael Trimarchi <michael@amarulasolutions.com>,\n Tom Rini <trini@konsulko.com>, Andre Przywara <andre.przywara@arm.com>",
        "Cc": "Andrew Goodbody <andrew.goodbody@linaro.org>,\n Miquel Raynal <miquel.raynal@bootlin.com>,\n James Hilliard <james.hilliard1@gmail.com>,\n Boris Brezillon <bbrezillon@kernel.org>,\n Thomas Petazzoni <thomas.petazzoni@bootlin.com>, u-boot@lists.denx.de,\n Richard Genoud <richard.genoud@bootlin.com>",
        "Subject": "[PATCH v2 3/5] mtd: rawnand: sunxi: clean sunxi_nand_chip_init()",
        "Date": "Fri, 27 Mar 2026 15:05:06 +0100",
        "Message-ID": "<20260327140508.3680105-4-richard.genoud@bootlin.com>",
        "X-Mailer": "git-send-email 2.47.3",
        "In-Reply-To": "<20260327140508.3680105-1-richard.genoud@bootlin.com>",
        "References": "<20260327140508.3680105-1-richard.genoud@bootlin.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Last-TLS-Session-Version": "TLSv1.3",
        "X-BeenThere": "u-boot@lists.denx.de",
        "X-Mailman-Version": "2.1.39",
        "Precedence": "list",
        "List-Id": "U-Boot discussion <u-boot.lists.denx.de>",
        "List-Unsubscribe": "<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>",
        "List-Archive": "<https://lists.denx.de/pipermail/u-boot/>",
        "List-Post": "<mailto:u-boot@lists.denx.de>",
        "List-Help": "<mailto:u-boot-request@lists.denx.de?subject=help>",
        "List-Subscribe": "<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>",
        "Errors-To": "u-boot-bounces@lists.denx.de",
        "Sender": "\"U-Boot\" <u-boot-bounces@lists.denx.de>",
        "X-Virus-Scanned": "clamav-milter 0.103.8 at phobos.denx.de",
        "X-Virus-Status": "Clean"
    },
    "content": "In sunxi_nand_chip_init there's quite a lot of kfree/return, it's easy\nto forget a kfree(), so use a goto/kfree instead.\n\nSigned-off-by: Richard Genoud <richard.genoud@bootlin.com>\n---\n drivers/mtd/nand/raw/sunxi_nand.c | 41 ++++++++++++++-----------------\n 1 file changed, 18 insertions(+), 23 deletions(-)",
    "diff": "diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c\nindex 9fc9bc5e0198..ecab9ebc9576 100644\n--- a/drivers/mtd/nand/raw/sunxi_nand.c\n+++ b/drivers/mtd/nand/raw/sunxi_nand.c\n@@ -1600,21 +1600,20 @@ static int sunxi_nand_chip_init(struct udevice *dev, struct sunxi_nfc *nfc,\n \t\tif (ret) {\n \t\t\tdev_err(dev, \"could not retrieve reg property: %d\\n\",\n \t\t\t\tret);\n-\t\t\tkfree(chip);\n-\t\t\treturn ret;\n+\t\t\tgoto out;\n \t\t}\n \n \t\tif (tmp > NFC_MAX_CS) {\n \t\t\tdev_err(dev,\n \t\t\t\t\"invalid reg value: %u (max CS = 7)\\n\", tmp);\n-\t\t\tkfree(chip);\n-\t\t\treturn -EINVAL;\n+\t\t\tret = -EINVAL;\n+\t\t\tgoto out;\n \t\t}\n \n \t\tif (test_and_set_bit(tmp, &nfc->assigned_cs)) {\n \t\t\tdev_err(dev, \"CS %d already assigned\\n\", tmp);\n-\t\t\tkfree(chip);\n-\t\t\treturn -EINVAL;\n+\t\t\tret = -EINVAL;\n+\t\t\tgoto out;\n \t\t}\n \n \t\tchip->sels[i].cs = tmp;\n@@ -1640,15 +1639,13 @@ static int sunxi_nand_chip_init(struct udevice *dev, struct sunxi_nfc *nfc,\n \t\tdev_err(dev,\n \t\t\t\"could not retrieve timings for ONFI mode 0: %d\\n\",\n \t\t\tret);\n-\t\tkfree(chip);\n-\t\treturn ret;\n+\t\tgoto out;\n \t}\n \n \tret = sunxi_nand_chip_set_timings(nfc, chip, timings);\n \tif (ret) {\n \t\tdev_err(dev, \"could not configure chip timings: %d\\n\", ret);\n-\t\tkfree(chip);\n-\t\treturn ret;\n+\t\tgoto out;\n \t}\n \n \tnand = &chip->nand;\n@@ -1669,10 +1666,8 @@ static int sunxi_nand_chip_init(struct udevice *dev, struct sunxi_nfc *nfc,\n \n \tmtd = nand_to_mtd(nand);\n \tret = nand_scan_ident(mtd, nsels, NULL);\n-\tif (ret) {\n-\t\tkfree(chip);\n-\t\treturn ret;\n-\t}\n+\tif (ret)\n+\t\tgoto out;\n \n \tif (nand->bbt_options & NAND_BBT_USE_FLASH)\n \t\tnand->bbt_options |= NAND_BBT_NO_OOB;\n@@ -1685,34 +1680,34 @@ static int sunxi_nand_chip_init(struct udevice *dev, struct sunxi_nfc *nfc,\n \tret = sunxi_nand_chip_init_timings(nfc, chip);\n \tif (ret) {\n \t\tdev_err(dev, \"could not configure chip timings: %d\\n\", ret);\n-\t\tkfree(chip);\n-\t\treturn ret;\n+\t\tgoto out;\n \t}\n \n \tret = sunxi_nand_ecc_init(mtd, &nand->ecc);\n \tif (ret) {\n \t\tdev_err(dev, \"ECC init failed: %d\\n\", ret);\n-\t\tkfree(chip);\n-\t\treturn ret;\n+\t\tgoto out;\n \t}\n \n \tret = nand_scan_tail(mtd);\n \tif (ret) {\n \t\tdev_err(dev, \"nand_scan_tail failed: %d\\n\", ret);\n-\t\tkfree(chip);\n-\t\treturn ret;\n+\t\tgoto out;\n \t}\n \n \tret = nand_register(devnum, mtd);\n \tif (ret) {\n \t\tdev_err(dev, \"failed to register mtd device: %d\\n\", ret);\n-\t\tkfree(chip);\n-\t\treturn ret;\n+\t\tgoto out;\n \t}\n \n \tlist_add_tail(&chip->node, &nfc->chips);\n \n-\treturn 0;\n+out:\n+\tif (ret)\n+\t\tkfree(chip);\n+\n+\treturn ret;\n }\n \n static int sunxi_nand_chips_init(struct udevice *dev, struct sunxi_nfc *nfc)\n",
    "prefixes": [
        "v2",
        "3/5"
    ]
}