Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp630312rwp; Wed, 12 Jul 2023 20:48:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlHByN8dMJFLXF20puE85fNLYIXWXSH3RB1oDD6volPGO7jNaM1ONX7iRsrbOcU8fOdZpvJZ X-Received: by 2002:a05:6402:b2e:b0:51b:dcb4:a9b3 with SMTP id bo14-20020a0564020b2e00b0051bdcb4a9b3mr650820edb.24.1689220107953; Wed, 12 Jul 2023 20:48:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689220107; cv=pass; d=google.com; s=arc-20160816; b=dgBPIbF1FQA3jBN8PjuwXqR6ruj+hT3A+3XmBN7tvFJHBSwVCmYsPiSap3TWaL1mYm As2CIn8TIYJXINMGfZA8p4flt5zjC4O1IwkAZdNdnnpYVLSXpbq8aGjO86rM4KYjllxH bf+hpb8B7uOFbGIH9gOZEPXZJhkrm/7XSCJKQ4JPOjfyhrbmSQT4HxeftHbYfZRSY/tE VZzJ4uujj9Zzmq62P5Jtw3xEw2f0DgzkbJpB7UirqurwcE+yPM2TgZlv8XhBJFFRdc/H EHnbJ5AlQGdL44BDaCq8LEvwzH9Ofgu4RGsJA7IDIWzScKcKgddCByiuwJeAqjwbX22s nLtw== 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=Lc9YVJilcupA9pmwEo5AjWmwYra46BWwjKr/918sM9I=; fh=Lw56UsKYrH069kRpuEp7uv7rOPGLAeLwln0xSgJFX04=; b=vsOTEOqh+GQ/TtV/I7FixXzd4go5UcDD7KvnjVgArNgJ9hg44FWmrj+DbxOyRuufgQ Jm/Ui9pge/0+DD5gsoMa4XZSi1Wnk7BQshDYoi1oyAHwZMFlufPIuO1I0PMLNMFTu1b7 Pkx6gqHm4N7rR51fSQE4LjQnFlezE7/2TkSm+TGQCDbnBP9oLIEd89U2apFatDxu+AMb f9wsPpbDbyU34JsXQaYw3qu7Fmc16pUygTjgJaJQF7BTtTL4vTSewGk6HxBqS8kR79D6 gMwuJxV/GYFT/OBP0RIShtQsBwUP5UqRAax33QVGF1zosUnPwAF5Z8NRt6p6rn1M+sKV 1p9g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=GnHxu4gN; 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 h6-20020aa7c606000000b0051df4a5a722si6121571edq.334.2023.07.12.20.48.04; Wed, 12 Jul 2023 20:48:27 -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=GnHxu4gN; 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 S233545AbjGMDga (ORCPT + 99 others); Wed, 12 Jul 2023 23:36:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232731AbjGMDg1 (ORCPT ); Wed, 12 Jul 2023 23:36:27 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2138.outbound.protection.outlook.com [40.107.215.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7879F1FEE; Wed, 12 Jul 2023 20:36:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RHmkGBiTLxQ5/KO8G/rWtLtorNDGd8dQ9+TwSa1suQFGh0AiRC0jemggTR5ONnHbyQsRy1ANXI1zBt8u0sn3RwdfjyGAp2/Ke9ukQWgK+C7qPveXT03ZG28TLQgFG0V9+HPseGVep8wkX339ItUe55m+/5H84lEu9714PvhDXo/O5jRY5n7gI12y6DWsezJngE0m9WLliksJnW5vNR0ry0aRJUhPbCptbgiPECqwAe/1Lvhy053eqK2jGql45/9e260666jrOUtD4G1zqybtGekezAKh5yysTaU9/sKnux2o1BoGXxkMKqrFwoscu0pu7oABKWly3xLbBPEwNNDyjA== 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=Lc9YVJilcupA9pmwEo5AjWmwYra46BWwjKr/918sM9I=; b=bfQxCYMg6lbaO2csilyEhpuVCU9lYjBYrBf5egqozVfLuGQGQx8mxnb3qBBWIndZjf3MgA2HRExT0Cp+dWYvjs81NkEnj4u6fB3ms4G36+/P9nT+cvN3cgrpaTHusf+0hbRScR0vJRVJS1U2XvTZRjOyHj6at0VD/bSufyYPFDRU8IEdLNP8d66mMr2MyO4Q3Lo7TH7/EmIBxQRx3ALFUPZ3pJQQEBtUyg/+DySFKUaWcTOq0g5b6mj+z2LNTcH1ix91gsCJGnHem8+u3JE+UaCCxBYRpFewAfb7EKt1QC8IeNfdzBIld3Pv+WE0NkCrD2JTEPqeTC1P0LM3VtN4zQ== 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=Lc9YVJilcupA9pmwEo5AjWmwYra46BWwjKr/918sM9I=; b=GnHxu4gN2BVH7VuXw8VhaIPtRMk2QUXMdtrwjKrfkGOc15W6ff5dGv+2oQ+oSlHXiDd33KKKWkbI0JSumVoi7IyMYETizoCo+FFhrllB8otKAzR+GxZAwol9G7UYnJKga+tfJ1c45GlPeNNlYiEDxwWBBNlk7WKwK7zd4V+FZdoUfxMc9+VtwNqGfOPJ01FF437t1sbt59TSoJXtkRD7Zg3QIU7/IWKvmb8wazhNJ8QzmooCDu5TWlcSn4oEaC+xK1TjtgAZN6oxw727rTNjPHuS0s5xoB2CmLX4ESNzHDWBXYb64vPCa2cMos4m18h2DNiWz7rRNlE0RPZlSZ1kbw== 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 SEZPR06MB5608.apcprd06.prod.outlook.com (2603:1096:101:c8::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.22; Thu, 13 Jul 2023 03:36:17 +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.024; Thu, 13 Jul 2023 03:36:17 +0000 From: Wang Ming To: Jay Vosburgh , Andy Gospodarek , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Yufeng Mo , Guangbin Huang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com, Wang Ming Subject: [PATCH net v1] net:bonding:Fix error checking for debugfs_create_dir() Date: Thu, 13 Jul 2023 11:35:54 +0800 Message-Id: <20230713033607.12804-1-machel@vivo.com> X-Mailer: git-send-email 2.25.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR03CA0095.apcprd03.prod.outlook.com (2603:1096:4:7c::23) To SG2PR06MB3743.apcprd06.prod.outlook.com (2603:1096:4:d0::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG2PR06MB3743:EE_|SEZPR06MB5608:EE_ X-MS-Office365-Filtering-Correlation-Id: cf575fd8-ac0d-47df-628c-08db83525098 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y6dAVVfkoRUBMkU0X1fVZmi8tSKPMeAaZFPxrato3BKHxDbWZE3ltMFLBSIJ5TUTun2ZHznexeUIAsyF7H0qRKhBJsXghRTT2XwLiRhcmfa1j883syHSzhjJzXDADuzx5Ne+xY+pZ2vzIFFiBeCehx/gQAIa4wiZvFm6SAtIddulTW+S0XZefv2lfrjgq84NcNkbJBBBU9WL9K2amB2jc+2mAQyKO2sYY/cfAFjcoVv2hoSJE+oiZo1ZOl08ZjHlUIXaGWQtdWiB7R7bwwWYABqY1vheN1CCdVsk6V4ChnngerLVNSBMbcb/sQoqR/IdeQMB4A+NnphDhWJ+sgVYcI4GqIK5to/iLx4qwTsq1GFW6dzpcYsYY4FEv+NGUUoT+bgyjQlVUp1ZoO1hy8EraE8Wdro8AIFEU7O0BPaJmFAXkdeQGLL04IFevIOfi9getrDRgSAhQr3vOrTEMBOmxaoItG43Tv45uMP39uNFD1JdVTgXo8c53mcqW5v5TXdcp8h09Fc9OOwwEgeNOx9BqY4Z08xe12WENIIA575yLgZsLoDqyVHWpfHT6XcuraOP3ioObH6t9aptxw3dDQAovv3LV57pYHPQvHGKTfB3QrFxDwBOpr2Y0LTXgHC7kT7k 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)(376002)(346002)(366004)(39860400002)(136003)(396003)(451199021)(186003)(4744005)(36756003)(2616005)(2906002)(41300700001)(83380400001)(7416002)(26005)(6506007)(1076003)(5660300002)(107886003)(8936002)(8676002)(921005)(110136005)(6486002)(66476007)(66556008)(66946007)(4326008)(6666004)(52116002)(86362001)(478600001)(38350700002)(38100700002)(6512007)(316002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?34KInPvA0g6483uUp/FL/ePs3lWa4tlZ1KTqgyKBctdzPD7DSdIEUm8i9Wtj?= =?us-ascii?Q?WEd3dH0yNYwkewHRoFFb0NsAOYUNUmEOjR4sgPakD0UCgCA7dJGiSf4wHIKV?= =?us-ascii?Q?FyGpNRYxPVB3KZahRClzksemaoVpXToJPrn1yn/t40eCH+pJv+ngbarJbPLI?= =?us-ascii?Q?hfAIkvA1jjmwjcWj75RZIcvYqc8iZ7qo/wfgqHfDbv1YbdwrpzUXCm0UIfus?= =?us-ascii?Q?6jRmhLwEXBMDDc3w+oW4xW/fTf0mRIZeBTk3gOO0ONVhJHIPEtyAcQ37RB1Q?= =?us-ascii?Q?29w0yGz8UEJILvdwEEjPcSFdxQPdZaVAxEK9t2fYtK5ZEnCSM0MIUE8X9PjY?= =?us-ascii?Q?qIMKLyegtNEEGVjOu/Z2P23AI5Z0RkxQa3HP43nv98zNXhH/6xH6+ipoXr2N?= =?us-ascii?Q?V7qUW5r2BG6d1ePSP7e5FTIrTWEVhnEnhzdADy8FiiyiNTUfaBde/GAXS1sT?= =?us-ascii?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jYsn16l1Sxu1DorR/FN?= =?us-ascii?Q?aIdexPFZFxyLx+RQINW1fSv88oql32mNDm6GUPYKRQbqv5yyteb1ox9D4sJ0?= =?us-ascii?Q?6XGqXo/bKhnfZWWfZhWmE9titrutxQ2oNXB8M2ZjCJwiCWh5CP/SRmW+vpVn?= =?us-ascii?Q?MCfxlV8lqHqZoaG3gKmLJFdN1GhQqFw/ksKJeh3xX9y8DpnanceIaST8OY3A?= =?us-ascii?Q?LDSq/G3V2lwI/ZSQWzhrucA2/705pRCXLFZcg3ri?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: cf575fd8-ac0d-47df-628c-08db83525098 X-MS-Exchange-CrossTenant-AuthSource: SG2PR06MB3743.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jul 2023 03:36:16.9493 (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: 0dtRJZXkCtCb2A1YQfW+7o9udPN6R1WBwMxIQL9ugk8h26i5Sdyw9bRuFeAEoP9VWHGlCGbPhW1u4JHrpJoVDA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5608 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_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 bond_create_debugfs() was forgotten. Fix the remaining error check. Signed-off-by: Wang Ming Fixes: 52333512701b ("net: bonding: remove unnecessary braces") --- drivers/net/bonding/bond_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/bonding/bond_debugfs.c b/drivers/net/bonding/bond_debugfs.c index 594094526648..d4a82f276e87 100644 --- a/drivers/net/bonding/bond_debugfs.c +++ b/drivers/net/bonding/bond_debugfs.c @@ -88,7 +88,7 @@ void bond_create_debugfs(void) { bonding_debug_root = debugfs_create_dir("bonding", NULL); - if (!bonding_debug_root) + if (IS_ERR(bonding_debug_root)) pr_warn("Warning: Cannot create bonding directory in debugfs\n"); } -- 2.25.1