From patchwork Wed Jul 19 02:10:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Ming X-Patchwork-Id: 13318058 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 073DE17D8 for ; Wed, 19 Jul 2023 02:10:41 +0000 (UTC) Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2119.outbound.protection.outlook.com [40.107.215.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EBCA1FE1; Tue, 18 Jul 2023 19:10:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OgcL5PDZTNaAEmGl3PoWBsw9LPQz53ud4r+bUBF0v2qQk0M6xZXTTnPyHamBHnk8vlZL1wB4yd20BPX0sZe4AtOp1N49UpCJim75hdr811O/NG/SHB/gSNYWxd4BzXrK3MpQRD2gOVdcxqvX3EB2wa/LvFNKWlJaDouqru5W0DRMhvMJ8zJ2plTDH8GChUX51p8T6J77kF1wlwoFvMmwDzLzlR0hiB38dZaceUjUa6/gbK5eqBpz6Csdpuoi/jSF/7ydGBx8yauwmKiUvJJS8YcbbNO2JVikShGebTlYxcurCSmPwVHPi6Vvo/yyJKhcvexZ685piGt3vV7N1Mmizw== 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=ekFck0qC/pwiK4+bDKUpzEgFy8PtAYCWu0gLo2NOliE=; b=hGfjj3wiBw+GM6bSd4sT7aofA8d5Q+yNBwFWKwdemneJv1/QdRDDvUzUygKsW+E8oDWRD+p3nsQGnM3JsLbqsP1LANqkxYDGiNz4yUKn/QWaMGPyco9gcHsbWYZdvUq8mKAa+9158IGzDa92LQeCqFQ/Wr+IhUbhQqhGhf9JkhjpRFQAoQgBBqg2hx4o5mBcdClS8xmRV5LAxhduuELyKV/hn0n/Sg4ytZbnXlvXxHAp+mgEUL9ZhabDvU3vWdE7G/eFIdGl7/wCd6Rli8xrqC0CphM00edkwJUFDCp9V4EgCZFD1PYs7tQUDvfe0AcBzM+pAx0zep+2Ju4gXNvv1g== 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=ekFck0qC/pwiK4+bDKUpzEgFy8PtAYCWu0gLo2NOliE=; b=n1GJ9MRMhE/odDS5BN25JxNoX1bE+4BKvsjY1zSGgr+aKTm5jXvffrsvAszTBT91xFO+Sxdmb2+tL4FVrjD82qjTs4v6mpYuMffxIpQhZMZykX6KZ6uvvMt63cQsVtcKfLwgkHkqv4wzswMClbxTthzpwvb6mGLmsLPLaF2VkLfFOokKCWWcjr1LWSs+gO84B+ahO3Al+uH//gkF3EPELpuqaQhnNXbHE9/ZMSZuVncCryHql/N7HdicliQYijA/h4DphTJeoqlpG6MVyazvwRHMP8CuligqKZ60qHN9zStYg5J0i7x+DHkMw8SMlp7kndINm9tjtgPyuTETkU8dJQ== Received: from SG2PR06MB3743.apcprd06.prod.outlook.com (2603:1096:4:d0::18) by PUZPR06MB6265.apcprd06.prod.outlook.com (2603:1096:301:119::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.31; Wed, 19 Jul 2023 02:10:17 +0000 Received: from SG2PR06MB3743.apcprd06.prod.outlook.com ([fe80::535e:25af:a3bc:d600]) by SG2PR06MB3743.apcprd06.prod.outlook.com ([fe80::535e:25af:a3bc:d600%4]) with mapi id 15.20.6609.022; Wed, 19 Jul 2023 02:10:17 +0000 From: =?eucgb2312_cn?b?zfXD9y3I7bz+tdey47y8yvWyvw==?= To: Jay Vosburgh , Andy Gospodarek , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Taku Izumi , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: opensource.kernel , "ttoukan.linux@gmail.com" , "jay.vosburgh@canonical.com" , =?eucgb2312_cn?b?zfU=?= =?eucgb2312_cn?b?w/ctyO28/rXXsuO8vMr1sr8=?= Subject: [PATCH net v4] bonding: Fix error checking for debugfs_create_dir() Thread-Topic: [PATCH net v4] bonding: Fix error checking for debugfs_create_dir() Thread-Index: Adm55ilWBPPQtKquwkiHp5nOeeSL1w== Date: Wed, 19 Jul 2023 02:10:17 +0000 Message-ID: <20230719020822.541-1-machel@vivo.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: TYAPR01CA0076.jpnprd01.prod.outlook.com (2603:1096:404:2c::16) To SG2PR06MB3743.apcprd06.prod.outlook.com (2603:1096:4:d0::18) authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SG2PR06MB3743:EE_|PUZPR06MB6265:EE_ x-ms-office365-filtering-correlation-id: 3a712219-d8ff-4e53-bf52-08db87fd4bd6 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Ws8feDLCbOhIsJ4huW7wNPR8tPrSvpzSxmztXYQ9dnuxDINovD9S33RvJPW4zFI+xugTEFTRA1AIyYtLSEomZpgay61QiKXZNPMJJSiG3+eMspl/C+yaPRFupUbKNAZ2TJpIxmFOM1nuulFtY4bPH2uhjgwGswhm3hDltoDWE/5r4/3ziiDYmiog6KOcjLhpAiOUCbJz+d/k6lySzm8erNRxEpi27zAgg5AMqF6SPtHkUaj+aQJgLUMUTxXEkVt7EjDzxNGX2ZpJmfmYYzSb65uKIie6bCc2kOjv2i5QYAc+EDXyZwDSDeLunu1cYFkO/1ZvZPy0CoT1tUAVDshdN4XR5EUUoigr/hR3Inm9OyiaR9f0LIji1UMUJKrs5WZH3hQLegbES9GbpKDOg+hZKvCU97B8mWdPIfrgDzvlFgF11YsG2AXFYjw/pKBU7DBq59Iu5ol2QGXeZJlMVxoChXod0vY/Oh6BYv7ozfFrr5ueYVzYtcxBt8aTtuITSZG8UiT81gs0qr48TlqVu61vEYuqCgPJzd4XVCiOkRbCjCG7l5ahiUZBYKuzHFVsjZi05uxjfERKvgHsOLQjqZcsK0b9ZztLb1cQ2/XojMz4TZI= 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)(366004)(396003)(346002)(39860400002)(376002)(136003)(451199021)(83380400001)(478600001)(52116002)(4744005)(186003)(2616005)(86362001)(6486002)(6512007)(6506007)(1076003)(107886003)(38350700002)(66946007)(64756008)(71200400001)(7416002)(38100700002)(54906003)(41300700001)(66556008)(85182001)(110136005)(2906002)(26005)(36756003)(66446008)(122000001)(5660300002)(8936002)(4326008)(66476007)(8676002)(316002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?eucgb2312_cn?b?QmVBbGZVRGs0UDlQWGt3eGlJ?= =?eucgb2312_cn?b?OWo2T210T0NUUkxvY2xyb2xKV1JoVng1UHdPcmFOeThVVGd0c1dld0N4U1ZwMG1J?= =?eucgb2312_cn?b?UVlTNG92bEhheXNGZEFVSHd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zZE5mT09OTTBXeVlK?= =?eucgb2312_cn?b?S0VaMVUweFloRlh4em5DR05vVnNaM1pFd0w3WUdvek5NTE1yQXRpK1pQalJKOXll?= =?eucgb2312_cn?b?WmFNQ0NhNnpOU3crTVVvVXRnZ3pjVVRIYVdaY0V3MmJlNjV0ZGFpVWZDSmdET3o4?= =?eucgb2312_cn?b?eU5xaGlneDl5VkovajNRSmJjK3FyTUtscGV1ci9ac1hrendMd2hyNzBWRjljN0Jl?= =?eucgb2312_cn?b?b0FLa1lMTEZRaEpTOGN4dmQ0Q2hTS2NWS1Z5ZUlIbXdkTFlsMXRKQUVLdVNZUmd0?= =?eucgb2312_cn?b?TksyaEpxME1iNkRQNThLNWJFMlNsRUdvMHcwSlB4aVBnMjF5Q29pQkhyM3ZwNQ==?= Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SG2PR06MB3743.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a712219-d8ff-4e53-bf52-08db87fd4bd6 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jul 2023 02:10:17.1478 (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: MNAF9N+QGpvcmu+xOsHUsHOmSld7aWHx8X2O8X5BGlEAWJZ4XtDA83qfq6Jv3f2fq3mCQXLtzhTGI2wi1EkrWw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PUZPR06MB6265 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 X-Patchwork-Delegate: kuba@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. Fixes: f073c7ca29a4 ("bonding: add the debugfs facility to the bonding driver") Signed-off-by: Wang Ming Reviewed-by: Tariq Toukan --- 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"); }