From patchwork Thu Apr 5 08:54:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 132848 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp6031654ljb; Thu, 5 Apr 2018 01:56:28 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+iOzQX3bSsYNOjujD0qdA2h6/JFO1KOz9QV2n38SXubmb9CSGeyOjuXxAYiYBqgZ1HBBtM X-Received: by 10.223.159.9 with SMTP id l9mr14347548wrf.185.1522918588704; Thu, 05 Apr 2018 01:56:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522918588; cv=none; d=google.com; s=arc-20160816; b=L2MoKhLRWq89IJ2OeB2H1DeLzK2aIt6s1zQqYCePx6l6wwleYS9nrVTU1oa46Pe7y3 NZzM2FKvXqPY2kIbujP5f7NqgmwYNGKT79zQKZb4jyrhi/m9OxPQ44i+EQF9j7L73D3M UEFF0bKZRYvdLGMarSMw7E+4z3f95lLY5CMa6ew+UHWTGCvM/cbKooCYz2PSWXpSO+iT fGfO4earasGOxhGB0lEvl1lLKAuFD0rcn0Le2VA5Qo9npH+LKrWBMWel3YIUndlv/RQs vKfOzt2WUyt6c5/ecULgxayTyI9GPZiTAJTyR3fhziqSv/scydmZndW4rSJ1xFduBIAd C/CQ== 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:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:dkim-signature:arc-authentication-results; bh=1fjCNwh3z8miiHGcJq6t0NO4OZV4XDY1oYhGawSEc1M=; b=X+voWdx+kxCMnrLcoz8F38t107FgDegVilafPIKCOAaXbwMG0a+JShIiGHnQY42iKs Kzue/TlO1+wXS4utqxtXgPJIQm3hrYMBSnZNI2kROh4bGKiGrJamVALaAWddBThCqoJT jy9313pyqlY0FNmTTF9g70ymcx52vdBejbSAop4OFBXdcY8lCo8s8wuXWoM2avF4hEH7 o+A2JSsqSc5xiWXnNFw46uTiNbhtQX+rW4pcGR97FRo0UzhuslGlG4GJ5LUCT7A37JHP VLg4JlDL89YxRbZ++sl/CJDBOn8ZeKcfLMbu13xDBvE+IcAUDBMGKNYZpFkQjH9KlyrC pf1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nxp.com header.s=selector1 header.b=TfGYkJZo; 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 30si5217888wri.548.2018.04.05.01.56.28; Thu, 05 Apr 2018 01:56:28 -0700 (PDT) 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=TfGYkJZo; 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 5EC391C9FB; Thu, 5 Apr 2018 10:56:24 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0064.outbound.protection.outlook.com [104.47.0.64]) by dpdk.org (Postfix) with ESMTP id E3D7D1C660 for ; Thu, 5 Apr 2018 10:56:20 +0200 (CEST) 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; bh=1fjCNwh3z8miiHGcJq6t0NO4OZV4XDY1oYhGawSEc1M=; b=TfGYkJZo+UyacO64TebIA+2GVZ+jvhzjAg0dNBPWnYZgHBYeBkB8ogp34AhpyfG0HGyYoA9ccRKIp8r+fGq3N1f0hVlTonIHKpn25INbuZoSI1s+k9/Wr8+yge9m25D/pn6E1BrPc5OhXuJc8XBo82p4isD5QusyXUCv3QXMSIk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (14.142.187.166) by DB3PR04MB0762.eurprd04.prod.outlook.com (2a01:111:e400:9440::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.631.10; Thu, 5 Apr 2018 08:56:18 +0000 From: Hemant Agrawal To: ferruh.yigit@intel.com Cc: dev@dpdk.org, shreyansh.jain@nxp.com Date: Thu, 5 Apr 2018 14:24:18 +0530 Message-Id: <1522918464-4586-2-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522918464-4586-1-git-send-email-hemant.agrawal@nxp.com> References: <1522918464-4586-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: MA1PR0101CA0043.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:22::29) To DB3PR04MB0762.eurprd04.prod.outlook.com (2a01:111:e400:9440::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 0a0b348d-d74f-44e7-62f9-08d59ad31945 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DB3PR04MB0762; X-Microsoft-Exchange-Diagnostics: 1; DB3PR04MB0762; 3:m8HVuyZhEreRjt+13a52TEIc4zPMKcDhe5gO1PKRaaGE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RLSDltI4G6/bBb3kXybgkDFjXJfyj81wd5vCialKwCONeS6HFWnRBdeplResJQWYz3aQ8kzEJVlc6DlwbGXt1RowbbgdZbi9RvvlZroNW8elpfDksf4fiKQdX4Ce5jsPNQ4GE6mnA4bUKfmXNZqnlLAHvZpkzN6FzxAYoHavqZMH49wlFSaMY7OLKvk2sTFcc8XRX27K9lI0P9jM8KEhzDya26G43wwdSkxWr+p+yaq9+x0FSs8vFxtwYzDuRCb4Lpj3ETfrprPobO3V4A7UJj8F6aTYAD7MWxG6Ui60KwY6zITV; 4:SN7+58kB4+ONLGJtVrTLO1Qv9FlVD0FD36cNzjNP+2wlmt2wb05vZZSuDD5oKOrTi3lJDGjpkAZcgak+lVA2xkU57B7eFtVJdwqCrw8Z+N14tVvjxx4OanGU5L9bzx+psWgCQTyT95l7VEqCQgZIbomxmEDtUkJyCTT0BSK/9isMK6W42avrcRUT72aTe6wHlZxRA2MLePeGG83MaNQZb1/6nTnsNs0h4Z2QYhYOvvUXxuNgAkwA1w+dFwPJEep/VJishWcZJitJyG2tlKWO8FzghRD1WavU/dbrpYN9aKP5Rkvc1YLzC9IkCUYtNR79JsTUPtYvschJwbza/gNRu2ghujy5JukiJL9FYrRPi+3R9AuHzBPxurhLyqEeXS41 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(227817650892897)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(3231221)(944501327)(52105095)(93006095)(93001095)(10201501046)(6055026)(6041310)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DB3PR04MB0762; BCL:0; PCL:0; RULEID:; SRVR:DB3PR04MB0762; X-Forefront-PRVS: 06339BAE63 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(396003)(366004)(376002)(346002)(39860400002)(39380400002)(189003)(199004)(76176011)(81166006)(53936002)(2361001)(2351001)(6916009)(25786009)(7736002)(476003)(50226002)(86362001)(81156014)(486006)(97736004)(105586002)(26005)(6512007)(52116002)(3846002)(11346002)(8936002)(446003)(16526019)(106356001)(51416003)(8676002)(386003)(48376002)(6486002)(47776003)(66066001)(68736007)(5660300001)(956004)(55236004)(478600001)(36756003)(6506007)(2906002)(2616005)(5009440100003)(59450400001)(305945005)(4326008)(6116002)(50466002)(186003)(316002)(16586007)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR04MB0762; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB3PR04MB0762; 23:7QBBgFAYmj0c/eo6GaPJbr4QYK689qMpTUXF9GZ57?= FXEz1HfPLBvT5I27OoeHqEvKaP2WM5esYWO42j45uaACrK5RgzXMfMnD65NdERdgr9vIo+oj+bs3fxLlnINCjGB5Hjh9OB1AtCmgiYhFS2R7mL/OmvhMHr4KZGFk+sScJ8XL6Jv8PoRwtwvp49EiHI3Z/cf/viEoyg6x2rFfEynP+1B2lsuFA7flFfi7oKi+vV0qHxOY6LSzbASspCchE40+3+RiRatDccZgoToF3Hh8eTkw+rurMie8gn9LGUscOxF0PAR1pJckeJtVHnhzMeJdfMhxY+nhoFX/Ib9aEp8MJlFb7qocoim4KjbDaVRSh+4bBN9QnheOOUt2RCgSAP0022uC7TNy0F5YOwO0KUiX8kbFiTMXoi+bBwn+u+nq77G1wLlNJjHO7K34FnVEQm5noJcYLGtkodhTWOax2fDfHnD/5Wy042WHsLk0hbR8UkF8zT0wE1PN1S5o1jW7I07vQKDLpwuIeSkQc2FXJb5CCvpexPRYuaH7UZphPvzP0HzU5Q9xCwBxlskcdHHo5lFJrSY/NHlCyfrWrmm/IuGGOlB1IW0RW2oHazMjYlvKUfT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r/hV6iuBxW7111CO9zGtOPkdEgPxRIUd8zk9Aop1CIPk/QCUlpxadxDkivM57E86zfyZGLW3EBftcjDyPlYYFt5hQ9BZx103RIsLKI81hcqGgvNFmN6vrGjFrRhjokSLxHVSVS4YDTlh4nRKtm58YkTfj+vpCsm4neR07S3Dkgd1p1GjzKhkHRfl5gW5ClK5YZjQWKLK/xrFzH/tSaWQ+N30XZVT4FT+kzBrz1GC+ZLdsdMe80P17I0UeXGAGw6YNdb7W4cSR/JXCKzB/JoAYt9VD3oTctpqp95KdnZ1jmFajziqlhzgZkpsZ3r+0ZcazfQ==; 5:jdl/vIED/KDQUyL7wMKhcEa/w3X1eGFQGf/eYoUJnYHdkOxDQ7+JKfbXZsYOYOgxJ4N5bN7V4ntrn6IRPaJUxmtbpypVKwnOrr20i15c/bVy3whYVyfpEtzfhAecnPDwxTKakTIlKhw2dTuPXbVm48YgmOL1UIP1QzBlaJOFW/M=; 24:eSvcvCYpJgqOJEs/Lt3G5SxDq/V+sPbKXXiJlfIpHm1W9sPtiwQDUaVzy7qRDDDIruhwmRZgWcTWKReCeF708yQ8gZXq7RcacST2wIVWmUI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB3PR04MB0762; 7:FnyMl30E9pOrQbdK7w8wMW+4sNEe+Bn7BszyOqUmZ3i0BPrAfC2G6k5kTwHqrxdjJrislIItYMSonj3byoxDpShSRgbZpEatTgI8m6B46+7hpLHPG8GdCsQrYj4+DkcQTYwj++kzubKi73f1ySO47Qg4VBlqZkHeC4JoF3QGCB2rDETutHqeyRzIGjrNzYIucJ8LdvCMR89Rbb2h9uEFP86uQ6vBpoiDv/NHKFMTU5/jNlX5q0c0pf8mIcHEt+WC X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Apr 2018 08:56:18.6172 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0a0b348d-d74f-44e7-62f9-08d59ad31945 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR04MB0762 Subject: [dpdk-dev] [PATCH 2/8] bus/dpaa: fix the unchecked return value 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: Sunil Kumar Kori Fixes: 5d944582d028 ("bus/dpaa: check portal presence in the caller function") Coverity issue: 268323 Cc: stable@dpdk.org Signed-off-by: Sunil Kumar Kori Acked-by: Hemant Agrawal --- drivers/bus/dpaa/dpaa_bus.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 3535da5..ffc90a7 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -308,9 +308,15 @@ rte_dpaa_portal_fq_init(void *arg, struct qman_fq *fq) /* Affine above created portal with channel*/ u32 sdqcr; struct qman_portal *qp; + int ret; - if (unlikely(!RTE_PER_LCORE(dpaa_io))) - rte_dpaa_portal_init(arg); + if (unlikely(!RTE_PER_LCORE(dpaa_io))) { + ret = rte_dpaa_portal_init(arg); + if (ret < 0) { + DPAA_BUS_LOG(ERR, "portal initialization failure"); + return ret; + } + } /* Initialise qman specific portals */ qp = fsl_qman_portal_create();