get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 28710,
    "url": "http://patches.dpdk.org/api/patches/28710/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1505373770-24737-1-git-send-email-wang.yong19@zte.com.cn/",
    "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": "<1505373770-24737-1-git-send-email-wang.yong19@zte.com.cn>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1505373770-24737-1-git-send-email-wang.yong19@zte.com.cn",
    "date": "2017-09-14T07:22:50",
    "name": "[dpdk-dev] net/ark:add null point check",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "6021e709935523a9af3717667d0b76f601ae4533",
    "submitter": {
        "id": 609,
        "url": "http://patches.dpdk.org/api/people/609/?format=api",
        "name": "Yong Wang",
        "email": "wang.yong19@zte.com.cn"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1505373770-24737-1-git-send-email-wang.yong19@zte.com.cn/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/28710/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/28710/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 65F427D4E;\n\tThu, 14 Sep 2017 09:36:29 +0200 (CEST)",
            "from mxct.zte.com.cn (out1.zte.com.cn [202.103.147.172])\n\tby dpdk.org (Postfix) with ESMTP id 394442C58\n\tfor <dev@dpdk.org>; Thu, 14 Sep 2017 09:36:25 +0200 (CEST)",
            "from mse01.zte.com.cn (unknown [10.30.3.20])\n\tby Forcepoint Email with ESMTPS id 31274EFA3BCF4D8BF39A;\n\tThu, 14 Sep 2017 15:36:23 +0800 (CST)",
            "from notes_smtp.zte.com.cn ([10.30.1.239])\n\tby mse01.zte.com.cn with ESMTP id v8E7a2lu045370;\n\tThu, 14 Sep 2017 15:36:02 +0800 (GMT-8)\n\t(envelope-from wang.yong19@zte.com.cn)",
            "from localhost.localdomain.localdomain ([10.43.166.165])\n\tby szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6)\n\twith ESMTP id 2017091415360592-2468365 ;\n\tThu, 14 Sep 2017 15:36:05 +0800 "
        ],
        "From": "Yong Wang <wang.yong19@zte.com.cn>",
        "To": "shepard.siegel@atomicrules.com",
        "Cc": "dev@dpdk.org, Yong Wang <wang.yong19@zte.com.cn>",
        "Date": "Thu, 14 Sep 2017 03:22:50 -0400",
        "Message-Id": "<1505373770-24737-1-git-send-email-wang.yong19@zte.com.cn>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "X-MIMETrack": "Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release\n\t8.5.3FP6|November 21, 2013) at 2017-09-14 15:36:05,\n\tSerialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17,\n\t2016) at\n\t2017-09-14 15:35:49, Serialize complete at 2017-09-14 15:35:49",
        "X-MAIL": "mse01.zte.com.cn v8E7a2lu045370",
        "Subject": "[dpdk-dev] [PATCH] net/ark:add null point check",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "In function ark_config_device(), there are several malloc without null\npoint check. Fix it by adding null point check.\n\nSigned-off-by: Yong Wang <wang.yong19@zte.com.cn>\n---\n drivers/net/ark/ark_ethdev.c  | 6 ++++++\n drivers/net/ark/ark_pktchkr.c | 4 ++++\n drivers/net/ark/ark_pktdir.c  | 4 ++++\n drivers/net/ark/ark_pktgen.c  | 4 ++++\n 4 files changed, 18 insertions(+)",
    "diff": "diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c\nindex 6db362b..f5a834a 100644\n--- a/drivers/net/ark/ark_ethdev.c\n+++ b/drivers/net/ark/ark_ethdev.c\n@@ -452,10 +452,16 @@ static void eth_ark_macaddr_remove(struct rte_eth_dev *dev,\n \t */\n \tark->start_pg = 0;\n \tark->pg = ark_pktgen_init(ark->pktgen.v, 0, 1);\n+\tif (ark->pg == NULL)\n+\t\treturn -1;\n \tark_pktgen_reset(ark->pg);\n \tark->pc = ark_pktchkr_init(ark->pktchkr.v, 0, 1);\n+\tif (ark->pc == NULL)\n+\t\treturn -1;\n \tark_pktchkr_stop(ark->pc);\n \tark->pd = ark_pktdir_init(ark->pktdir.v);\n+\tif (ark->pd == NULL)\n+\t\treturn -1;\n \n \t/* Verify HW */\n \tif (ark_udm_verify(ark->udm.v))\ndiff --git a/drivers/net/ark/ark_pktchkr.c b/drivers/net/ark/ark_pktchkr.c\nindex c3040af..202a1d9 100644\n--- a/drivers/net/ark/ark_pktchkr.c\n+++ b/drivers/net/ark/ark_pktchkr.c\n@@ -112,6 +112,10 @@ struct OPTIONS {\n \tstruct ark_pkt_chkr_inst *inst =\n \t\trte_malloc(\"ark_pkt_chkr_inst\",\n \t\t\t   sizeof(struct ark_pkt_chkr_inst), 0);\n+\tif (inst == NULL) {\n+\t\tPMD_DRV_LOG(ERR, \"Failed to malloc ark_pkt_chkr_inst.\\n\");\n+\t\treturn inst;\n+\t}\n \tinst->sregs = (struct ark_pkt_chkr_stat_regs *)addr;\n \tinst->cregs =\n \t\t(struct ark_pkt_chkr_ctl_regs *)(((uint8_t *)addr) + 0x100);\ndiff --git a/drivers/net/ark/ark_pktdir.c b/drivers/net/ark/ark_pktdir.c\nindex 66e5ce2..771dbab 100644\n--- a/drivers/net/ark/ark_pktdir.c\n+++ b/drivers/net/ark/ark_pktdir.c\n@@ -45,6 +45,10 @@\n \t\trte_malloc(\"ark_pkt_dir_inst\",\n \t\t\t   sizeof(struct ark_pkt_dir_inst),\n \t\t\t   0);\n+\tif (inst == NULL) {\n+\t\tPMD_DRV_LOG(ERR, \"Failed to malloc ark_pkt_dir_inst.\\n\");\n+\t\treturn inst;\n+\t}\n \tinst->regs = (struct ark_pkt_dir_regs *)base;\n \tinst->regs->ctrl = 0x00110110;\t/* POR state */\n \treturn inst;\ndiff --git a/drivers/net/ark/ark_pktgen.c b/drivers/net/ark/ark_pktgen.c\nindex 8c7a8a2..018f37b 100644\n--- a/drivers/net/ark/ark_pktgen.c\n+++ b/drivers/net/ark/ark_pktgen.c\n@@ -110,6 +110,10 @@ struct OPTIONS {\n \tstruct ark_pkt_gen_inst *inst =\n \t\trte_malloc(\"ark_pkt_gen_inst_pmd\",\n \t\t\t   sizeof(struct ark_pkt_gen_inst), 0);\n+\tif (inst == NULL) {\n+\t\tPMD_DRV_LOG(ERR, \"Failed to malloc ark_pkt_gen_inst.\\n\");\n+\t\treturn inst;\n+\t}\n \tinst->regs = (struct ark_pkt_gen_regs *)adr;\n \tinst->ordinal = ord;\n \tinst->l2_mode = l2_mode;\n",
    "prefixes": [
        "dpdk-dev"
    ]
}