From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5F2E143CB1; Thu, 14 Mar 2024 08:40:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A68D742E24; Thu, 14 Mar 2024 08:40:48 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2100.outbound.protection.outlook.com [40.107.236.100]) by mails.dpdk.org (Postfix) with ESMTP id 07B1640297; Thu, 14 Mar 2024 08:40:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EXADrBlfwWnjUwBjjnyxQkNXE4wzLR1Xwloj1ngNxrbWTTLHeBmb1BpXN38HrCPyGpQ++S6GWU0TJAgO5jTu+GRXaJki3RtN0pZgWK2Pvguo8MSWT4TqO/XLGdgeWiBzS4KgFTYqM7U3YDZb8BHUcmG4tOXi2ObmmSPlqnlVZD9CC7JyX0Hi5/0MK9bUWksglzZi6qxfNVydOqpQQIkngaz/6eaqNyjcmI020MFSLAmgV9xsChRVRNGNBEZ46xkRuq9/tyIysQzHT0y6APdm6ySxD7V5zbcf0esvD6wMJg69tRqV5Aes3m2AA3fVoIYl2bAXjtJrM9T1KR2JGf5BSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1uLu2HW35M23tAbofZLr54h/j0u98gr94LoPFBLAaO4=; b=MVZgZpLi7cwxB1axL579K80Erf1Gc8hSAAyCX+n8U4lQK/AWcR/iuZd1oYY8zKD9qsoyhZSalY6qhS8Uk7hf3FfBX+VwOdcNgUsFpunqt1bFLxJok8dDBXCmqhiqoVD9cKbrBWy7XNnvkad3mPnYwsX+5wZZYwuazbfzrn5AaI7/p7cGNT6qQgJuIvn/77N+nllEJW64r7TwGd/FJ4coqgwaSX+bqiEsJ6xxvbX2CjkFokCoh9aQhjq3M0wLaj0EccqxqRWnkox9e4dRPZNTF4sv6zd6kS0nUjSYFy0anRGqZhA9fLl3WJaSC8wOr/uE6VU6JsmyfiJs4KeddkUsrg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1uLu2HW35M23tAbofZLr54h/j0u98gr94LoPFBLAaO4=; b=gaO9C30sSIDMDDeWFSXfXC43IPKf9nnVJNLil1SgJrJIRxtVg8TVsnOG6+qQAU8BhT/sa5f9VdkoytOZWtw4R9KWz2g1Az+kOiwJF4bEOIPnJ7H4lAICRV4GHG7+JW+B40iDoPbKV+F3wmYSon0nULu0tlLDDijY6mSLKIOdQCI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) by BY5PR13MB3617.namprd13.prod.outlook.com (2603:10b6:a03:21b::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7386.19; Thu, 14 Mar 2024 07:40:45 +0000 Received: from SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ec12:7411:559a:850e]) by SJ0PR13MB5545.namprd13.prod.outlook.com ([fe80::ec12:7411:559a:850e%5]) with mapi id 15.20.7362.035; Thu, 14 Mar 2024 07:40:45 +0000 From: Chaoyong He To: dev@dpdk.org Cc: oss-drivers@corigine.com, Chaoyong He , long.wu@corigine.com, stable@dpdk.org, Peng Zhang Subject: [PATCH v2 1/8] net/nfp: fix return value check Date: Thu, 14 Mar 2024 15:40:17 +0800 Message-Id: <20240314074024.3199555-2-chaoyong.he@corigine.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20240314074024.3199555-1-chaoyong.he@corigine.com> References: <20240314070536.3169210-1-chaoyong.he@corigine.com> <20240314074024.3199555-1-chaoyong.he@corigine.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BYAPR11CA0107.namprd11.prod.outlook.com (2603:10b6:a03:f4::48) To SJ0PR13MB5545.namprd13.prod.outlook.com (2603:10b6:a03:424::5) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR13MB5545:EE_|BY5PR13MB3617:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a53a13f-84f8-4d9e-3234-08dc43fa0eae X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 97SDhayxETNk1LseWaYsU3GMwmhyi6V3SVb5lDA5G/GDEtMG8IdeQ+Zw7dLZOWdvG7ZdPEuLuPQFrIIGL1d/XR8UrKCe4N0Y9uAsYoCE3ucmdtUqA68MdtkRg5JnhNJhVZZbu3rkwr72bM61rvwucgQ89T9F5ww+8Q0zX88HKM/Gu6UXmkLZXZQBu1EADUWKBglMoRpCX4sCTKenSCevU0NkxrdZpovKoIXWeoAM1uKbsOQhKhH21gA3Dt1XB+RqjB4/o/tQaOxmUV7vADzRQBzJnfxOJfPKzbXajBBuYc5VAI4q6g6jXuTp2QAmPi0KeokN7DAK8OjEcoYxkQxNBZg+Lenl1yW03NlmLV5vi9RTcO9E9NdXm9rwtms7sE5hU8orZ1iXv2SdmRlhbxAy7UFvUGjjLOvZIM5HqcAHIGRTY3j1qNNKur044ycU3y4SNjn2i9A5/JGh02wQnCWF3Fc6tlPwrh+w0BndL/bPfqfgJzqdTQv2ak4QrdKkr2QB3unhJT/y6JIgkkxvt5g8nTvDTKpNpor3SxoFIf8YWoY+sWcvjIX1bcjjPZkSNTn0Eafcbm1JEZlVWczGn7i7n+6pM667xuvB81kvCJPWgh21UMIIObx88USvSC2tr4X406BiZDsKeBGWWl5Hl4zCfzw97Z+w2x331SvZoaYKoMQ240R8JpAH7n0d76PY7m55YjzgyaE9RSmWghCGND+0O3coqRMchM0yWqOPZMAJQ5E= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR13MB5545.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(52116005)(376005)(38350700005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?QYsUWAkJNEvEGS1Q2aX1qoy2/bxwXEDxEhVhKmF/Y24Ldq7fXNjSgCccAOj7?= =?us-ascii?Q?45Efmsv0GE/HYaxO14OmThXbtJuUnLjJFr7tjR/T75wttf9znLpKP0TWYrGs?= =?us-ascii?Q?l34gHKx+zKMHJb8bjW7AFaIFHldUQnTe5hRO7NB6YZafbN9RYT1DPljn7g9T?= =?us-ascii?Q?LhNLtkMN60Br6K9BAjZqdK03gjBGHLJSxYkQ8Ju5af9OJZLxtoC+5M5xRMIJ?= =?us-ascii?Q?t2TnImlRnhc7FeCaY+mQgggmLrFoIlintSI5NuMB7pGTxFYOsGHLRwpHw39P?= =?us-ascii?Q?lCVAA3+BYOircEQgf3RuI7jUdEjBRYwhz9L6rqWieInN6dH6PjJNbtiucyLJ?= =?us-ascii?Q?2T/yyDB5ivrw2TeTkpJyaC9W0LjVgcRRX4RdUdWgY0OUr+ZM8Bv46TLfU2dy?= =?us-ascii?Q?EaOtSOl/0CQ8MYpTdLeZWzOWcJk/OcMz41WJVT1Bw/Izr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JmhYszOPwQAK4aYXUYxHAFOpQnxZHNGG1WU0i?= =?us-ascii?Q?1FYYtLOXLS6yDQq+wFNqrzyKjiZd2BvxvPgmzQAQufpk60UyS/Fd3tZziXEB?= =?us-ascii?Q?sf1ZJDdU3xc3paA77bR6ymKX4QgzkFFyGp+nIx5agOcGz7tOrdwnEFYGZ6Q8?= =?us-ascii?Q?pHy6TC9R3Z2O8XkF0Ym9OPiqfmjuC/Ec1w8oznbRw26878t16bR/lbLM8URy?= =?us-ascii?Q?VMOp97Ma1J+oO8lw09VpojRP7CsxKMlGLAn0y86gy6/Nuwq8Y7wDzr0wPBGa?= =?us-ascii?Q?wA=3D=3D?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a53a13f-84f8-4d9e-3234-08dc43fa0eae X-MS-Exchange-CrossTenant-AuthSource: SJ0PR13MB5545.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2024 07:40:44.9727 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JjGS+KqGvGMwwq55reGDNkW2BQ5Ml1asebqNI1diGhug/Hh96PHmKI3eu3+bmFGLIBy9wMp/+I5drT/GHtjPrr1dYNyofcNDa2UOnhcYaKM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR13MB3617 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org CI found calling 'rte_eth_switch_domain_free()' without checking return value. Coverity issue: 414936 Fixes: 20eaa8e2ebae ("net/nfp: free switch domain ID on close") Cc: long.wu@corigine.com Cc: stable@dpdk.org Signed-off-by: Chaoyong He Reviewed-by: Long Wu Reviewed-by: Peng Zhang --- drivers/net/nfp/flower/nfp_flower.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c index 97219ff379..303f6bd3f6 100644 --- a/drivers/net/nfp/flower/nfp_flower.c +++ b/drivers/net/nfp/flower/nfp_flower.c @@ -793,7 +793,8 @@ nfp_uninit_app_fw_flower(struct nfp_pf_dev *pf_dev) rte_free(app_fw_flower->pf_hw); nfp_mtr_priv_uninit(pf_dev); nfp_flow_priv_uninit(pf_dev); - rte_eth_switch_domain_free(app_fw_flower->switch_domain_id); + if (rte_eth_switch_domain_free(app_fw_flower->switch_domain_id) != 0) + PMD_DRV_LOG(WARNING, "Failed to free switch domain for device"); rte_free(app_fw_flower); } -- 2.39.1