Show a patch.

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

{
    "id": 10847,
    "url": "https://patchwork.libcamera.org/api/patches/10847/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/10847/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20210111163359.43637-3-email@uajain.com>",
    "date": "2021-01-11T16:33:59",
    "name": "[libcamera-devel,2/2] libcamera: pipelines: ipu3: Simplify error bail out path on start()",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "60415df6abf3c9f3f40ce705dea1c7a540394b21",
    "submitter": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/people/1/?format=api",
        "name": "Umang Jain",
        "email": "email@uajain.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/10847/mbox/",
    "series": [
        {
            "id": 1574,
            "url": "https://patchwork.libcamera.org/api/series/1574/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1574",
            "date": "2021-01-11T16:33:57",
            "name": "ipu3: Simplify error paths",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1574/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/10847/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/10847/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 0C678BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 11 Jan 2021 16:34:13 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D0B3C680BE;\n\tMon, 11 Jan 2021 17:34:12 +0100 (CET)",
            "from mail.uajain.com (static.126.159.217.95.clients.your-server.de\n\t[95.217.159.126])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0A54C680BE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 11 Jan 2021 17:34:12 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=uajain.com header.i=@uajain.com\n\theader.b=\"kUKvgeSG\"; dkim-atps=neutral",
        "From": "Umang Jain <email@uajain.com>",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=uajain.com; s=mail;\n\tt=1610382851; bh=yZW2MmJhm1SRNzcqFX+Be/eDcmIZUiLB573/Jnrb3z8=;\n\th=From:To:Cc:Subject:In-Reply-To:References;\n\tb=kUKvgeSG/eZA87qi0/sGD262SOAmSXwTSGxs3MBcZEh7uymXmPJito87jTogRUegD\n\t8Umr++RbcAz6C4vEThzJ3eFU19X5NTucD0IQDqvlBMMn+4cT0p0BsOMTmn3TGleEqO\n\thBUxEPQ6KneWe0ok8vKPLFYGH+mDey4xJEmToiR/hRSZXXaU0Fq2hnGifF4I0O/K2s\n\tG08eM3uXRztT3L29pew9aurM+n7hSAa8Q0FtMVKWNRYmmCVj6DZ80WhYKznagK+ZFr\n\tGc8tsmUSuK0Krmnz99tySCZ5IigukJRpx2bvvZNq1WcuvoGRRZWiH7WhRzP5ymhOzW\n\tWZJmL1zy89f/g==",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 11 Jan 2021 22:03:59 +0530",
        "Message-Id": "<20210111163359.43637-3-email@uajain.com>",
        "In-Reply-To": "<20210111163359.43637-1-email@uajain.com>",
        "References": "<20210111163359.43637-1-email@uajain.com>",
        "Mime-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH 2/2] libcamera: pipelines: ipu3: Simplify\n\terror bail out path on start()",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "On the bail out path, always ensure that ImgU and CIO2 are stopped\nbefore freeing the buffers. V4L2VideoDevice class guarantees that\ncalling stop() without having to call start() is harmless, hence use\nthis guarantee to simplify error paths.\n\nSigned-off-by: Umang Jain <email@uajain.com>\n---\n src/libcamera/pipeline/ipu3/ipu3.cpp | 7 +++----\n 1 file changed, 3 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\nindex f1151733..73304ea7 100644\n--- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n@@ -617,15 +617,14 @@ int PipelineHandlerIPU3::start(Camera *camera, [[maybe_unused]] ControlList *con\n \t\tgoto error;\n \n \tret = imgu->start();\n-\tif (ret) {\n-\t\timgu->stop();\n-\t\tcio2->stop();\n+\tif (ret)\n \t\tgoto error;\n-\t}\n \n \treturn 0;\n \n error:\n+\timgu->stop();\n+\tcio2->stop();\n \tfreeBuffers(camera);\n \tLOG(IPU3, Error) << \"Failed to start camera \" << camera->id();\n \n",
    "prefixes": [
        "libcamera-devel",
        "2/2"
    ]
}