Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp38348496rwd; Wed, 12 Jul 2023 06:35:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlETNlEnR/v4VQdlVey2vYRmFMgOjav5uIliqFmVCPhxvbT4Ou22L3R5c5+8+biD7tEbMIPZ X-Received: by 2002:a2e:9d1a:0:b0:2b4:65ef:3af5 with SMTP id t26-20020a2e9d1a000000b002b465ef3af5mr16848828lji.30.1689168946138; Wed, 12 Jul 2023 06:35:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689168946; cv=pass; d=google.com; s=arc-20160816; b=zCukqOyr4rznmJ+BJkDASuWQiCsNh/R1fnQSWLWPyylNKm7Qdq+84s4xf/CokWpJYr D+yBvc/IWwmz8OSJNS09NqjZmRCm3TZga1xgBzMn+GNsLEHXY8oG7DeP/eO44qcXJi2D b8iN4SwQlqUp3BzyHPY2uGEwUqs3VZ0VTsdqt+gyj4RFQ64x+PVC7fdQl2eF6MGdAEXn uE55YJmeDW0w5VB76YPSxoFiUA75/6h8Pa0H45m4BkfdvhORwUw29S3J4y+0vC1/Cn0G sK2rpDoman4tIjcl4DGeP6rqk1xTk9eTf2FOSGiepMLWGahzvqIzD0zfM3GGEsPK8eiF sBig== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=3KyH18EUJ3vlZfmWiDB66XBTSDqXPUV7j9Li/DHQ5SY=; fh=fWtjtCDoQ5qzUmZ+VKIwFcQP07nm20ubGKgA3u9YurM=; b=v4Py7so9z27mDut+KGio1RyYETLvDKqCL4gipRlsiW9bU8oPNyTmuLGUP9CZ264DGT Rw++S42MTPx4LOX3ojBqwB4CiPzYGyr1NuOVOeTvPWVaP4FQJrWt0c+3k2SWSkwIiBQs vO4TDAy1500R/UFvdTsbrCSygrEeU1pqmwBfaSwG+T3w7pXnoEI55Jfdty5/WNEUArMn lSxrOZ0ylhlZxynmkJk1E0S1Ha0Ih34AQbmcZaaoPJlXhTtshdIF+Hbbf5C5BjUJrEAK VzhUZ3RC87wmU0FvFKDGlEkgIG2bsSnHjeFhnpxgIRUgQiLqWsRR4yhkzc7z4KahhKPr yXAg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=gBtA6s+3; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n25-20020a17090695d900b009939cd92a18si5977864ejy.73.2023.07.12.06.35.21; Wed, 12 Jul 2023 06:35:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=gBtA6s+3; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232130AbjGLMUC (ORCPT + 99 others); Wed, 12 Jul 2023 08:20:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231932AbjGLMUB (ORCPT ); Wed, 12 Jul 2023 08:20:01 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2118.outbound.protection.outlook.com [40.107.255.118]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CCD29B; Wed, 12 Jul 2023 05:19:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h1YusR6pZFOsHi7luZpS0PbUeRHOg15OMJaqfvkLHd/y29WBV17VqDVCRHqiAwRZUMKY0qpXXB4axT52o/mywG6FbBOhcCmiGgRIfH/L4HxIPzmHaeyOnZSSta/vzI+YrSqdohQ0d+Ki+la2w0xunAX7yxrBywiaTU4WSAvvt3UB/vyE3AhBBOM48KuLmZP3R55WEi7zkCq2iW1MFslAulm0ykUgpRHac83gJ1LWdZq9O1jGWkw/SN8sv+M6hnP0vn2Un0G7+VTssCpsQNgVGr4fiJh+GaMc1zrx5yeTSUMm7cxqsPcJDBTkzm24cr6yb2tBPVquInLpXwlwzTOe0g== 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=3KyH18EUJ3vlZfmWiDB66XBTSDqXPUV7j9Li/DHQ5SY=; b=VKT6kV1YF8q5iuWstncWSQ84bkhueOD98/OuSdPfs2ZUCl4eLK9JV5BHN4nlmFP96JpfhiY4y9p5qpH5edFhkXI8BLAfCyahb2WA8qypdPJ9FY+kNvgTlF1mXLlActwL/0KuYqAjefZ2y86Jyg/2QRN1D7O66659IfsWCwggs7hNwCFRk7Muz1uKW0BBbnYZklrJlII1STyi3AtfIVCoymHfVwRgDFlbp3KJmf8dl+1eoHh9s/ejZq8S20MHF8zil+q/lH3JbL3JRpQVeqLUInZsPoVyIL/nR4Bfvs+xF1YU+WtOIMVhTzL8Uffkl97Dv7u007GWMcYUcN8jlR1ebA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3KyH18EUJ3vlZfmWiDB66XBTSDqXPUV7j9Li/DHQ5SY=; b=gBtA6s+3okNQb5nLE0wU+D5hlZ+B3PEtk7VkiwCnJXgeb0cWETNAQ9l3LH/3SB2SfvuA1EH/FvQxncHS9qBeDCS8R6EPghDgUUvkhr79cbp7CP1DThax/+sRsp+KjU/drkT7/SG2yZJZshFWdnutMKlkXdAxN6sJoK00J3UCtF/+umjztWpIEZOBDDZ+SMOSSM0LXoVDu/F20wQ7vOt/Z247YWCgH3mCKSelibT2G3BjBkBl077m2g0oFqmgDs/SD2CG1Ga/GMPDbpIgxv73/ecFdqlJFq3JJs7+4Lf9gUfiUFxQmN09G1N6Pz66iBG8r1G8fmb1D1kygknEB05CcA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SG2PR06MB3743.apcprd06.prod.outlook.com (2603:1096:4:d0::18) by SI2PR06MB4393.apcprd06.prod.outlook.com (2603:1096:4:155::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.20; Wed, 12 Jul 2023 12:19:56 +0000 Received: from SG2PR06MB3743.apcprd06.prod.outlook.com ([fe80::2a86:a42:b60a:470c]) by SG2PR06MB3743.apcprd06.prod.outlook.com ([fe80::2a86:a42:b60a:470c%4]) with mapi id 15.20.6588.017; Wed, 12 Jul 2023 12:19:56 +0000 From: Wang Ming To: Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, Wang Ming Subject: [PATCH v2] net:Fix an NULL vs IS_ERR() bug for debugfs_create_dir() in i40e_dbg_init() Date: Wed, 12 Jul 2023 20:19:31 +0800 Message-Id: <20230712121943.7597-1-machel@vivo.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TYWP286CA0017.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:178::10) To SG2PR06MB3743.apcprd06.prod.outlook.com (2603:1096:4:d0::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG2PR06MB3743:EE_|SI2PR06MB4393:EE_ X-MS-Office365-Filtering-Correlation-Id: 1ce59582-ac7a-47f3-ac0d-08db82d24da2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6uK2IOgVA28TSnYz7TLffGKN1bP1b3piaNxw7FJyPY7ArGtFP3Cr2z0DOs7PBUmDiV/Uy4YyzNAW196hr4Zs61EAMYqWE7Ljd+eIo1wGkOaXtSQ8UaOzdBTcz/7bCz1gimqqzBmPUaHdWcN9M8BDp6Tcab4OM2NeDzn2q9Kkk4oIVRFgB2STsrGZ1s4EKhGNCsfgn03T6jOf9FliXiMM0koTKKxtu+jN6tzvzkVVdYsuGb2F0An4E2V0lMB5D5YUCgt6pfxbeChrbhnwFP99QKqCWoGL2EDtQPc/jYdJ/GThxonrrrxrLIINU42w7wLaq5n/h/OjImMPcig1tZnaMCiJ/97L59DhKKGh96wT9XkkqmBnhXwq+4TUBEpATsaaQnCQ/nfAGgsUc4F/HZOX+gN7Z7Ey1ieSiSHruY/jBLxjDPdOw5+zcOeV/HJAt7gvDubSS43ok+T9WQUU13UxQvgQAuxYn0KGGPsL9OoisJtDS7P5LMy+evs55CVh82JLTgUCl9eUmufz2xRxAA7q8yQ23WmiTVCvWsrlggn41hnBKzqyCkdXcVue8QEb1z/9GYPiRk9LuVpHj4Up6zhoYz5lg/F8O4+YIRTvIUDrbtI= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SG2PR06MB3743.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(346002)(376002)(396003)(366004)(136003)(451199021)(52116002)(6486002)(478600001)(6666004)(110136005)(2616005)(83380400001)(36756003)(86362001)(4744005)(2906002)(66946007)(6506007)(1076003)(26005)(186003)(107886003)(6512007)(38100700002)(38350700002)(8676002)(316002)(66476007)(41300700001)(5660300002)(8936002)(4326008)(66556008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?/BCe8eoFHgU00OvBjBHJJoqqnD7msQg1JQdMjsMj18An6Ce60Hy2Fy6+moMq?= =?us-ascii?Q?o8qY/RqLeFHw7JK6NDxIvBwAS/EdMadfd7TVNHHO3uvIBT8GlzVwOk3SqX4Q?= =?us-ascii?Q?+21dESRJFUII2MUYmyayEK8fntowbENbS1Hn3COFcof7EdnJyKvLvf3/tCYI?= =?us-ascii?Q?f9qZiOevF06ZefT+PNJS10u3rHzJBi6qqvb7MM1x1tLwyArlQ95YxNkfEhY2?= =?us-ascii?Q?lIUSXVcJb18229UF4dWprXkJ9FnDhEIPA5Yf3FhktYB8H9DfTCQ0mWK/VWVa?= =?us-ascii?Q?Ahlljm/qvR/PPD2F3H37CyI83cvN3uuvzex6kC2bbyygIwBduk66RvOSc6c4?= =?us-ascii?Q?W8gZtzl2r/fr14y4QrYOuVdhcDydmT/H4irLtIl+feYJyCUvT7pVECkUNbPT?= =?us-ascii?Q?nONIBvRGdPVBO4VKZqTZvf6aB7rMoSxKPJWW9YiBCvriSd+gtC/l7RjOShxs?= =?us-ascii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Xqi8dI2o3iU0OAg29sdN/NnUIxnRSQ?= =?us-ascii?Q?cXI1Ajff9Avzcc0PNmnh6KahhrN+tIv00Q5+84w9Oy0uTGHCrxrbmlM9B3I5?= =?us-ascii?Q?kIzKHfuctz+/pzzZEbBf3EzdAfgClfQX6OuQnkVH+t3ohF4C03FqxkBBObNt?= =?us-ascii?Q?FwYNoGeQj6UfPltQH/EtE837kgA7uKc/WED3aRQ+UFKyQ1l++lYPJoZNCGeU?= =?us-ascii?Q?VKv2Py+UwMREUKmkuEwkdaOrHN7En2LK8KCNUnDW?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1ce59582-ac7a-47f3-ac0d-08db82d24da2 X-MS-Exchange-CrossTenant-AuthSource: SG2PR06MB3743.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 12:19:56.2121 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UMau5IXGzUy5EbptaU6A7b5pqHErLdpGubyvMBuiw6i5F91OMBX8M/W1A3NRZZJTcDIeXULYXgOYUe0260FclQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4393 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The debugfs_create_dir() function returns error pointers. It never returns NULL. Most incorrect error checks were fixed, but the one in i40e_dbg_init() was forgotten. Fix the remaining error check. Signed-off-by: Wang Ming --- drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c index 9954493cd448..62497f5565c5 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c +++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c @@ -1839,7 +1839,7 @@ void i40e_dbg_pf_exit(struct i40e_pf *pf) void i40e_dbg_init(void) { i40e_dbg_root = debugfs_create_dir(i40e_driver_name, NULL); - if (!i40e_dbg_root) + if (IS_ERR(i40e_dbg_root)) pr_info("init of debugfs failed\n"); } -- 2.25.1