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 0B610460D6; Tue, 21 Jan 2025 18:09:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2CA3A4067A; Tue, 21 Jan 2025 18:08:41 +0100 (CET) Received: from egress-ip42b.ess.de.barracuda.com (egress-ip42b.ess.de.barracuda.com [18.185.115.246]) by mails.dpdk.org (Postfix) with ESMTP id 69B4640657 for ; Tue, 21 Jan 2025 18:08:34 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05lp2174.outbound.protection.outlook.com [104.47.17.174]) by mx-outbound40-251.eu-central-1c.ess.aws.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 21 Jan 2025 17:08:33 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=M9l4poKVYU458Efy+OrkMLb2E0Xh5vw11t24i1FmntS2O0GML0u6DmRE8CqLg1EAXRkzG7j+KRh1LIYsaqVN1f08roHrETnhTIxQSIyxLNkMmavfYbE3vN4CPRQzoJJQ2AEwoVMnC3tjEQS65QqUU0gUt0ohcCkBjo5l9faS/jN66tqtYLjeRUHmYu9G2fRHL76dAWg9OFUDN935QDPiUwGLBKMMwKbyU01Nou/gfadm4vX2rfcdzCihkGSLqx/q8YD5X84bXCTJn1wM1K4OSFSA7KbAD7nC1N5A/Ml0idulXHYIPxTZCDZSuYcp3F7aeF65Ir0xaRAWfqCBYZhJHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=ez9uKHEUc7uLu6aPINCCgXr6zDbeFTb4eU8i4xXRCZo=; b=oO0DVlkr2z0Iz2XHu09E/TjLAN0MvXU9yDBE3MACJSuGGZwNAY3/WsQ3k8CfuYn/hifKNi++RP/ryqQ9IpVAbFox0YIi0jSvpvhATHRWxhiibZhBdFXCyIgKRsAQWwFPEP5QSUfISeaK0WAGIROytMyvpkuzgsVkqADtu2aNoeM1sHG7ux1KM9+k7RIkj4I9tGklgj28yYiC9P/KMbITzxABsoeZhmPoEARGUQpiBq5Nz7ManU/kq2NuOk/mb86EU5apNbUFfXt1T7tlZaqPB4IFBZrZVinYLzdweRPBa45jUpfbPqd6N8+M8VUnoMmUi5JmcQpLDvGPqqXlLRFb+A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 178.72.21.4) smtp.rcpttodomain=dpdk.org smtp.mailfrom=napatech.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=napatech.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=napatech.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ez9uKHEUc7uLu6aPINCCgXr6zDbeFTb4eU8i4xXRCZo=; b=Gbww2SFSh/ELUcYboJV4ma/D2b40by3SRMTEY9LVHRYuLhyjLWSXzAXWLVDWifc7Njg4RpXLL7querKLjC5ePeuIA28Jeqi3bC/Fyk4mQp7ltECx+tn7Rw2JoAZiHYoEgyvmZiBIonZX4tydWiU5BW5778kDE5jJTvaRWPIg5dk= Received: from AS4P251CA0030.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:5d3::18) by PA2P190MB2126.EURP190.PROD.OUTLOOK.COM (2603:10a6:102:40a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.21; Tue, 21 Jan 2025 17:08:32 +0000 Received: from AM2PEPF0001C70A.eurprd05.prod.outlook.com (2603:10a6:20b:5d3:cafe::3b) by AS4P251CA0030.outlook.office365.com (2603:10a6:20b:5d3::18) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8356.21 via Frontend Transport; Tue, 21 Jan 2025 17:08:32 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 178.72.21.4) smtp.mailfrom=napatech.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=napatech.com; Received-SPF: Fail (protection.outlook.com: domain of napatech.com does not designate 178.72.21.4 as permitted sender) receiver=protection.outlook.com; client-ip=178.72.21.4; helo=localhost.localdomain; Received: from localhost.localdomain (178.72.21.4) by AM2PEPF0001C70A.mail.protection.outlook.com (10.167.16.198) with Microsoft SMTP Server id 15.20.8377.8 via Frontend Transport; Tue, 21 Jan 2025 17:08:32 +0000 From: Serhii Iliushyk To: dev@dpdk.org Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com, stephen@networkplumber.org, Danylo Vodopianov Subject: [PATCH v1 14/31] net/ntnic: add null checking Date: Tue, 21 Jan 2025 18:07:52 +0100 Message-ID: <20250121170814.3252171-15-sil-plv@napatech.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20250121170814.3252171-1-sil-plv@napatech.com> References: <20250121170814.3252171-1-sil-plv@napatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM2PEPF0001C70A:EE_|PA2P190MB2126:EE_ Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 8111949e-eb74-4aa0-57ca-08dd3a3e3c17 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?8jwQsY04u4WEjMrsMwgqyEBAEde2TD2GT4Chpkm0+jXN2j2CmD5dNNhpKEd1?= =?us-ascii?Q?IuboMujeTpO2NUMIu8eW5EA8mV2P5YxIUWMtStuoHd+2drocbnt4pDiWYfp9?= =?us-ascii?Q?TUB3ci2H079zr8IiUTs8xqfJoSAKaKptMuSBJwiPlJvUg8xS1/7WvUKTueE9?= =?us-ascii?Q?/btigW9kB66FtO3fVx5yiq+tR9rtSk5JMzhHx2xbdAw/0IPv/trLu7vWXwtI?= =?us-ascii?Q?W8b52QAGU9HAG7Hu6z8tUpLFD9O5XzLdCjhx2J7VL1l0d7mWhD0FROSpvRYn?= =?us-ascii?Q?dp8pYLcfUcFZTTqhNR0vw1AM8Hx11leCwgxS413cbEtAnDgmr1/GGvu6bU0h?= =?us-ascii?Q?sByKtajASxmGm7UPHwGxtmtbzZwrl4L+5BA1r18OsCoskDfzlPiq9mY1VNAB?= =?us-ascii?Q?FkobhsidkhUhdnW2MN/OkXdOOo1zr9oZMVOW9OMwmhUCgm7Alc9vOwalEg8Q?= =?us-ascii?Q?6UdP1C9ixoAaUawoQsD1iB7a9arSSKLgHHUiFEZGcleYBQh96JMaqi/447jw?= =?us-ascii?Q?bsYd8zflq+TMH+eJwreaxMrddMCRkK2+WnsKMyGkC6a1MjQCLvqQZICh/VTZ?= =?us-ascii?Q?11Zy/EUrQyybD5U71B1pv5nJQhJxTv7HIZfwwLriWphPkti1Rhakufx3sUgr?= =?us-ascii?Q?ejdF4zr1HQl5LtXVFmBxm7gCe/wGmK0W1E+JOEtsUarG6E7GR5txNh810uRg?= =?us-ascii?Q?i0gFJKupMgPSDrsI14V13zHMtt9resUOwy8oJVhiMLBmtacA0Gz/BdXsslaq?= =?us-ascii?Q?mm1kegT56mXPilUkGzDf0Uo4i9eSxpp945E9cFUI493M2oaoR3g74uAhfV7O?= =?us-ascii?Q?s/kkZlWYqA3EdWAueUQoYowvhI7L6Di5g4tV168NZdZUrnuQ0gTXUcokhZW9?= =?us-ascii?Q?UiLfvnPRl5je5tprIxjBPQNxrf2E5meTyiAt8Lp8n5bieHDyaoof6UtmiGkq?= =?us-ascii?Q?5+QoeR6G9cN2K6IJcZht+HF/yrg6oGQ/QIiCp/jUwb3RgaZga2+MzaY8pYLO?= =?us-ascii?Q?FDYQ8XyNsLhxsffpWtvORzlXVEul/Rl3AJDn69ocVyULrKHjTL13AzGNZCdG?= =?us-ascii?Q?xdjrjQJg7HrxUMvwaJAqSzCHoj3dnnrMpXq0CCBavS2cl4wsWsNm0Ol+Dg2j?= =?us-ascii?Q?1Dj25aEKttnVktDVRCSnf8VuMFsHXRF3X6nW5b/c1fo2lDebe5a+wOlvN4Zf?= =?us-ascii?Q?iYihu5Osv4VDTEODVLWtfdhfsHQYrvScJhy1u7kxSo1NAie9K08sAM8Kyij5?= =?us-ascii?Q?Akn1CGMyKi0A+LaV8UuIL8NGCAkHm67VBn1BiP//jaUkiLMkD6878Lubvbp/?= =?us-ascii?Q?10xbN1Cg7cc3WYOFVg30EnuMRfvhbIJZ9CZI0Om8v97EcZh/qRChuBaBB4Ij?= =?us-ascii?Q?L+RGy5pnLfiYKM1dhgK6+jU8QSJanWcBmh5Lcg22dy86FovpD+fgO7GrVKmN?= =?us-ascii?Q?o/P9ASClmjcSuvBMtj7WPmBDq5zFpZ5wsP0unWkqOeBF1v631uwNPRZkr9l1?= =?us-ascii?Q?R9rdPBzkTkbUjG4=3D?= X-Forefront-Antispam-Report: CIP:178.72.21.4; CTRY:DK; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:localhost.localdomain; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(36860700013)(82310400026)(376014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: ARZ8bDJzRZHVfpz5RASc9S31RQupXIxOotg1AnJ5dBqE4vS7VF6vUb1Dn1uRZSHOqMm8qUppWQPXoBz7G0n76lNkajochXxH3xKIC3pIsnBXmjB5QKqSvmkQpenvw7PYzbUX5NTeA87Gip6kTNMLThJiNtF4NHeCALiqOepi1VlfUewdjsJAyQvAw7FPC4c6rlAbR6qfM72rhMrTBGdF58dmy37Vh+Fup9hCacKgXDiuOfberk0CgO5wyFbkaa6fIInCM+WKvQQeObWvAXpsP5tG50DdIywzKA0JecYnb60EI4nxvOGVDcu+GbvUG1abmpqOoFM04cnuQu2BgQ25KL0geNMK1YF2smMjPl3jx8ObxzBh/lI+HJpSIilfH6maDudOe8HJAOl/TEwCpdTBVQOhsx657ZY/kR91TSEsaWzKgHLYvZEjeiqBsY+rPRPBmX+sAjAOD0HX7/QXplwVdashd3bemJdVZv+qh3ykihid8ZbX4tFIGx3AqRO7zFew3nRMVFSNJZ3YRDydWr/iemkkd57GXjsvyTfG0JzU0wMHhonPiqbRIjgVONu52wVWyGDMmdgusuybz1YWI7Fnzk4jgpDK7Ix/fdxaUGyxBAIBjJChY3Bj/opcFjkj7l5m2pIAXtQGx4StSl+BVcpYSw== X-OriginatorOrg: napatech.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2025 17:08:32.5774 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8111949e-eb74-4aa0-57ca-08dd3a3e3c17 X-MS-Exchange-CrossTenant-Id: c4540d0b-728a-4233-9da5-9ea30c7ec3ed X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=c4540d0b-728a-4233-9da5-9ea30c7ec3ed; Ip=[178.72.21.4]; Helo=[localhost.localdomain] X-MS-Exchange-CrossTenant-AuthSource: AM2PEPF0001C70A.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2P190MB2126 X-BESS-ID: 1737479313-310491-13354-7751-1 X-BESS-VER: 2019.1_20250117.1903 X-BESS-Apparent-Source-IP: 104.47.17.174 X-BESS-Parts: H4sIAAAAAAACA4uuVkqtKFGyUioBkjpK+cVKVpYmpkBGBlDM3NwoxTDNwjwp0S DN0jzR1MDIKNncPCXVzMAiJdko2VCpNhYAq2KkZkAAAAA= X-BESS-Outbound-Spam-Score: 0.50 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.261957 [from cloudscan10-245.eu-central-1a.ess.aws.cudaops.com] Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.50 BSF_RULE7568M META: Custom Rule 7568M 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.50 using account:ESS113687 scores of KILL_LEVEL=7.0 tests=BSF_RULE7568M, BSF_BESS_OUTBOUND X-BESS-BRTS-Status: 1 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 From: Danylo Vodopianov Add null checking for fpga var. Coverity issue: 448916 Fixes: 30b2f87ac650 ("net/ntnic: add GMF module") Signed-off-by: Danylo Vodopianov --- drivers/net/ntnic/link_mgmt/link_100g/nt4ga_link_100g.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ntnic/link_mgmt/link_100g/nt4ga_link_100g.c b/drivers/net/ntnic/link_mgmt/link_100g/nt4ga_link_100g.c index d8e0cad7cd..67dc0d01f6 100644 --- a/drivers/net/ntnic/link_mgmt/link_100g/nt4ga_link_100g.c +++ b/drivers/net/ntnic/link_mgmt/link_100g/nt4ga_link_100g.c @@ -405,7 +405,7 @@ static int _port_init(adapter_info_t *drv, nthw_fpga_t *fpga, int port) _reset_rx(drv, mac_pcs); /* 2.2) Nt4gaPort::setup() */ - if (nthw_gmf_init(NULL, fpga, port) == 0) { + if (fpga && nthw_gmf_init(NULL, fpga, port) == 0) { nthw_gmf_t gmf; if (nthw_gmf_init(&gmf, fpga, port) == 0) -- 2.45.0