From patchwork Fri Jan 11 11:58:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shreyansh Jain X-Patchwork-Id: 155332 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp488117jaa; Fri, 11 Jan 2019 03:58:35 -0800 (PST) X-Google-Smtp-Source: ALg8bN719m/hp9ZGljH2ReWglXX2zwPXHbp9RrfACuQtLaz+JFfovSpjaoyn+JVNAeNURE+ryHee X-Received: by 2002:a5d:68c3:: with SMTP id p3mr13635140wrw.34.1547207915238; Fri, 11 Jan 2019 03:58:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547207915; cv=none; d=google.com; s=arc-20160816; b=RlGBKJ21Q85lr5OIO8eeLW/fcbCQM2ufdrJrXF+Hhp7Q7oCvGN9W2os9Kdm54I8GVD UJ7BZeYEBmHNyhmOLOvW+c64uerkaet5fZGEQ86rprtBpveepEaR36ArcSWlOD9ULEEW VjoI9EHmQAJBa9uqrUxnHL3rZDWITEb7G1GhEP3+tY7SguFha2ytnUlgi4NYQYN+dJuN BCrHJQBaDXSPVsEvO08iZ2vA6QJ3A6FttMatbAB2Q4Pip0vp6VbMbSwaRx+Jb4U9Y9Hu 4cyzB0odW4XGRo0dH4E7I4vl65qSHrcFWeSPCj1S1/6D3ec5a+BRjB9YYy6nK3URtuur CA5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:mime-version :content-transfer-encoding:spamdiagnosticmetadata :spamdiagnosticoutput:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:cc:to:from :dkim-signature; bh=2KefYBuRuHKcRHY+K+80jpe/WWrJogeZIOmtopG2lQU=; b=EFakxSyE8t7GYvjK+kb6mXZKTNq/+OijXgIRwaew35H2+ldAbWmUUQ3SnZGPRqGB+j rNlqgyDfjmjjyNxfN6QPKXrH6vBv8yoyvBy938H3mKhPSvk/IkbyCCbqd2lFZKxM+OFQ KT+g5nzBRPv7IekjgSVKykS9rQnTk0zubkwjTXP83jQ9sz5sdtxkwJQfbbPsocF+HMLV /c0IkJFgZY+hIAc7nX5MI1+0qNWANp5I7VkHvmeJUznfNNno7V9UbtRw3Jcd9OhaMtVw oyXeockVwSVSzLdSHloMk4bzXapSvXVFFArtmo3Q2n6YxCcoH44VSlyt1QG9PDinAXkg JJvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=u79yKJGr; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id v18si38848459wrp.134.2019.01.11.03.58.35; Fri, 11 Jan 2019 03:58:35 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=u79yKJGr; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 65D921B9CE; Fri, 11 Jan 2019 12:58:04 +0100 (CET) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10084.outbound.protection.outlook.com [40.107.1.84]) by dpdk.org (Postfix) with ESMTP id 0730A1B9F6; Fri, 11 Jan 2019 12:58:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2KefYBuRuHKcRHY+K+80jpe/WWrJogeZIOmtopG2lQU=; b=u79yKJGri6hmTWtlKTq37UoO830etIFZrIyo+O7rYjw5M8DB9LsJAcI7rlK+8KQ5Q461bWJsAg0FYwnU0Ky5BC0G+OutXhtngxDwMADdVleVJr9u6YGoXqXEaZoFBjGE1e3tXQJ5wo4TGaU0UbBEJb5ZNMhhhsSvEv4lFdZpjkE= Received: from VI1PR04MB4688.eurprd04.prod.outlook.com (20.177.56.80) by VI1PR04MB6221.eurprd04.prod.outlook.com (20.179.26.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.18; Fri, 11 Jan 2019 11:58:01 +0000 Received: from VI1PR04MB4688.eurprd04.prod.outlook.com ([fe80::b1eb:7e7e:7b90:7b4]) by VI1PR04MB4688.eurprd04.prod.outlook.com ([fe80::b1eb:7e7e:7b90:7b4%4]) with mapi id 15.20.1516.016; Fri, 11 Jan 2019 11:58:01 +0000 From: Shreyansh Jain To: "dev@dpdk.org" CC: "ferruh.yigit@intel.com" , Hemant Agrawal , "stable@dpdk.org" Thread-Topic: [PATCH v2 04/20] net/dpaa2: fix bad check for not-null Thread-Index: AQHUqaTnIRbKkrbGO0CM7PTm7nGsDQ== Date: Fri, 11 Jan 2019 11:58:01 +0000 Message-ID: <20190111115712.6482-5-shreyansh.jain@nxp.com> References: <20181227062233.30781-1-hemant.agrawal@nxp.com> <20190111115712.6482-1-shreyansh.jain@nxp.com> In-Reply-To: <20190111115712.6482-1-shreyansh.jain@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [14.143.254.130] x-mailer: git-send-email 2.17.1 x-clientproxiedby: TY2PR01CA0030.jpnprd01.prod.outlook.com (2603:1096:404:ce::18) To VI1PR04MB4688.eurprd04.prod.outlook.com (2603:10a6:803:71::16) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR04MB6221; 6:mhum/QtzUB40X3g6DxCdu9gJETOh0O/FJFAYl9qE8YLrPe9hB8D/8aYA63Sz73JL52uzsTtWO1LvC3RyTCXy7vuXbVU1ZL+s1m7uddaLCCfZsxeo/ImSWj8ljQj0BetD1Y6A2ZeeeLcFSSntcXgJBuZFV2nQEgZqUWdbnJK1Vd5i3pcuvQVXCXrQSpEVS17quOwEpgWMbTVoX/f0kK8QeeCn+3gCn+SGjFmDb51aZ9nj8hLffvhAkqaHJKwPYGRsOouzGlgcOhE7c8SetEs4P1XT6qlkQ4mHaEob8jVQpv4huy4sv1Pp+sAJi0EFdVo+B0iwOBq2x/E3aDLQz+fSiaGcE6kKnIdNAs8yQSbh9TAv+nYhKmwIy32BCzieFy6ifbMytNEghgihZvDyufOzaH4c21n8Jt+l2D9xns/MSE6O3wYk001q/6uuRhHFMjrS6iz9EMGq5akin0HciH03HQ==; 5:NMQNIfKiOOTP5snMHwOxToWcawlTX4q9ZWXqYBlC8vlb+ZhHuQTRmc/UcqWnjxrw6fRmh8WqwBVKMvh22QUJ1l+Vj5Wkqg1PmdDrwWCjC54ARcrV15m3nWo0tKzn7ys3ZAa8ByDJuEtkNohyB1Siw6SCZ21N+HTKlxzcxSZfmDY05u+2q4pM5pMvDcaGGG0PBiu8a9/KGfgBQkcGt5bMtg==; 7:pbUcC87R7F4F5oFwpwLg2gVf+IMgATIzRA1xYckxK0xFNLCJ2FYcSXN5Qc/O+FFGgjlKIKxRuZbIgCDFhmp3A6iNVTRg6yS4LV6iCGlgWveP0iaKdtRbLD8QXDaz4FDUTtE0OIqHOvDFid4usdfTug== x-ms-office365-filtering-correlation-id: ae953519-edaf-4cda-1ca8-08d677bc092e x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600109)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR04MB6221; x-ms-traffictypediagnostic: VI1PR04MB6221: x-microsoft-antispam-prvs: x-forefront-prvs: 09144DB0F7 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(136003)(346002)(366004)(396003)(39860400002)(376002)(199004)(189003)(6436002)(2906002)(54906003)(478600001)(71200400001)(6486002)(97736004)(36756003)(4744005)(11346002)(2616005)(476003)(78486014)(66066001)(71190400001)(446003)(86362001)(256004)(7736002)(305945005)(99286004)(14454004)(316002)(8936002)(81166006)(81156014)(1730700003)(50226002)(8676002)(2501003)(6116002)(6916009)(3846002)(1076003)(76176011)(52116002)(68736007)(5660300001)(6512007)(105586002)(106356001)(486006)(5640700003)(4326008)(25786009)(44832011)(6506007)(386003)(2351001)(186003)(53936002)(6346003)(102836004)(26005)(55236004)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR04MB6221; H:VI1PR04MB4688.eurprd04.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: rsItH//fHmTIhnpy3/5ZHEU8fQkjfof8uC5wwB7OEIF2Aift6MvzQC7RJR0seT28NP4Dhbk1AOfT/Gyu6brZFUpz202w0o7CFFFUy4HVySNLD4+89C+Tld/CWIzZ5ih1Ln5WB+7+dSFWHusUIZr88rJJGxBV5nvCy/NSuiAk2rCKPoOafgDHRVF8WVT3ks2Uls7rDoxqnigGAISyCpx3YGTRB6Cyn8nSMmAA+1lAZHTwbRaX7JAGikaUK8MeXIPexslaWlbIRVSyo0rCPWb8xzIWynSYyKWElKF+EfLPvO/obKUIthgS+QR5L2o7+v5CM8cwPUQ47plNMotdJElIK/gUkmMWZVv3wu9vY9V/T1gBX3HV+OEl9zm0H/8iVeF6RLWUbxlzbl3ziGPQMj3M+WkbdETqDalo4DyBINmfDK0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ae953519-edaf-4cda-1ca8-08d677bc092e X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jan 2019 11:57:58.4198 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6221 Subject: [dpdk-dev] [PATCH v2 04/20] net/dpaa2: fix bad check for not-null X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Hemant Agrawal The check !dpaa2->cscn is not correct to check non-null value. Fixes: 5d9a1e4d23fe ("net/dpaa2: enhance queue memory cleanup") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- drivers/net/dpaa2/dpaa2_ethdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index fa71807e6..8d4ea1bca 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -311,8 +311,7 @@ dpaa2_free_rx_tx_queues(struct rte_eth_dev *dev) /* cleanup tx queue cscn */ for (i = 0; i < priv->nb_tx_queues; i++) { dpaa2_q = (struct dpaa2_queue *)priv->tx_vq[i]; - if (!dpaa2_q->cscn) - rte_free(dpaa2_q->cscn); + rte_free(dpaa2_q->cscn); } /*free memory for all queues (RX+TX) */ rte_free(priv->rx_vq[0]);