From patchwork Wed Jul 12 12:06:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minjie Du X-Patchwork-Id: 13310267 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3F06EB64DA for ; Wed, 12 Jul 2023 12:07:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229506AbjGLMHM (ORCPT ); Wed, 12 Jul 2023 08:07:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232554AbjGLMHL (ORCPT ); Wed, 12 Jul 2023 08:07:11 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2116.outbound.protection.outlook.com [40.107.117.116]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E659FE4F; Wed, 12 Jul 2023 05:07:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EjrDnwMc9bOpLJi31Ef56OviiR860lSHqnVSEGj/Z6pJS3nSNp9TS3kmvp2vCeXE85iELb9WAtByKvd5AgMXGBsVaxRbKUYrZ7UAUS10aPZZkhEakuS9228UAerjov308p10VEXW0EDgJp5tK+F2z+c83Ch63fJ7k31X/J8VXWMeqQpCnEtxwQNcdHVzp4z8lIvf4D/5/Bcv/7ALK7c+hqgpKeFiBbvJD3oDcyK6xifUvNbU2jH0zl3J9FqdHBNr7eA6x9yUrAyHi/lqic4bmm2rwmzZC8C8mCVdAH154ucGPys42QGNEOTMrdg41UMsfQ+Eu0ZtFXqgOaXfX/58JA== 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=ywrlneogh8cbQojwEV4Do/qwFW1PmSYmGdHKyfV04is=; b=hol9/ql0vk+M52u7vz5CB6/9h0eFmBndglIYngz1g6bRcSqheOpT+rKYe0RqhsMALt6j7MUbAGi7biNrexWES9l0U/X6KOxOgoU9/RFEyrwpRbnYB7aibOd1j9BtA+dZajxVkmPApE4n+E5e3L0Av1NkeZC+FmbBHWo2jOYdXyVejpdK/Dh+uE8yB4COYG3dd1Ay31KsT3eQMALoMRFNoQdoMR592c2oB+IE2qo2F/JUA5SOP4D+2p++sOflNQlhsJryspdjLpEyt1ebf7JzBFlzW6ilfpGtjW3wjxvplSgjtH6arJfrVqtNCwiLLiHgVvcRbYOvjH/G9ZD/V4BcGA== 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=ywrlneogh8cbQojwEV4Do/qwFW1PmSYmGdHKyfV04is=; b=gh7Cy2N+LHpdZQxnYn2aY7uW33QVEgHKWoWi/bYRy+htUVsTM3I0NMNL35Us9tCvf7QtNfmKm55kdFhBbcMD8ayDQ9vlBWQ/ka8nHYHzo14mMx5vGAy+zlrvjC2T8lisLuxaQ9gak3ic6KHWLFJvZ8hCzr5ZhBfyr3V5F0DBIj7FPko+lh0zcyJWoETEFkby+r/BVtYHiDbsVpDRAyWP6GSHX5DcrkkU/3Ga3uWgsybOZmFNSEzLYIt9kuqG15O4lMiV84VBtnA59S38YXSt6nerHrtZ25kXYx+zJV4cBeO1FNg8cMd66yiRN+rd4cGt7tRs+IhqOelxZgVu8UV2kg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SG2PR06MB5288.apcprd06.prod.outlook.com (2603:1096:4:1dc::9) by TYZPR06MB6499.apcprd06.prod.outlook.com (2603:1096:400:462::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.32; Wed, 12 Jul 2023 12:07:05 +0000 Received: from SG2PR06MB5288.apcprd06.prod.outlook.com ([fe80::f9b8:80b5:844e:f49a]) by SG2PR06MB5288.apcprd06.prod.outlook.com ([fe80::f9b8:80b5:844e:f49a%6]) with mapi id 15.20.6565.028; Wed, 12 Jul 2023 12:07:05 +0000 From: Minjie Du To: Tony Luck , Borislav Petkov , linux-edac@vger.kernel.org (open list:RAS INFRASTRUCTURE), linux-kernel@vger.kernel.org (open list) Cc: opensource.kernel@vivo.com, Minjie Du Subject: [PATCH v1] drivers: fix parameter check in create_debugfs_nodes() Date: Wed, 12 Jul 2023 20:06:58 +0800 Message-Id: <20230712120658.14032-1-duminjie@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SG2PR01CA0114.apcprd01.prod.exchangelabs.com (2603:1096:4:40::18) To SG2PR06MB5288.apcprd06.prod.outlook.com (2603:1096:4:1dc::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG2PR06MB5288:EE_|TYZPR06MB6499:EE_ X-MS-Office365-Filtering-Correlation-Id: 36df132e-311d-4c46-f4c5-08db82d08238 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VQX2M0C9aryPWPVrSOfgOKeyOwi3zB3GGacirFyQF38R7gXm0YJBArgPF+iu+yP3WEotgMxY8GCOBi1UZm44Y6ADfYNHcJqtC4/tFSw2imTxEKNzsIkxh5SU7ozyhd+76XDRnmgDlg7dsf7aoZbRGMnnkZUQiKSuHyAJZDeXJGiWDEwKKnluuLOIyFOZJT9+LUI4c6/l+Gft9Qan8KQDpVhCC8V4S4QTSllsOs6lIJEGJO+edilDhBR6LR5dqfQ6k7ONyFnoQ5QL00vMMEjvuXVbWCp9WiRrZJfZUwt7Gln8jFiL0VIp6QlhKaQNJ7zckv0to8Nj/4CfJTzNIEsjACUqzYvMZ/Es+nYUg8tT5dB39TWnLFcFvYJMc0YX4NJBIC2b60k/y8z0w8CbjH5QkLhohRvfp1ksysRus+ekxzx/Rri2Oobw4Dg1x/YFBUa7bBGrORcxo7Y4WGdv2XpD7wrd56yGTKEHi3B9kyGHr8HJAtaYlRxlAz6PRvY33aoRuOzg+YW2zFHu01hwEU6uLyebCcwJKx1ZC3FEX7WLddU9adXRIHBI1f5H8+XC+Ma6fZ5J1U7ii0eTks+QUeYkzKCI29BFsQc1Om0iaAC0qGwOvA8IcIYTW94mpSZyOtVm X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SG2PR06MB5288.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39850400004)(396003)(376002)(346002)(366004)(136003)(451199021)(52116002)(6486002)(478600001)(6666004)(110136005)(2616005)(83380400001)(36756003)(86362001)(4744005)(2906002)(186003)(26005)(6506007)(1076003)(107886003)(6512007)(38350700002)(38100700002)(66946007)(4326008)(66476007)(66556008)(316002)(41300700001)(8936002)(8676002)(5660300002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ILiygHXvW/4OnAdjWmrUX0EHv7XpuWMVo8kq/Q7UcvwRXWC2boBaXr37x7OiiZfaOH584r9IJtdH1WuqouBq63axH5IV9rU7/S7dcypmYOhXxTpY7VxVqU13E58RSYnioPycSjrDRA3gRz1L9w1ertEv1rL+nftD9TEBiGixZLxn5qp+14fn1HH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FtexwHZaCIkhjK5lRHeIOUZZM2p2qMaeGirRJPqgUma3pObLjW3zWQir7cAK3g5mI8WcajBA8Gfn3zhSgOG58oPtPBtYQ4hyq/nUWZIHl4js8ALgS2ekk/UaKy1/6Fv/Gs1OWXmUI9G0nwkulZL+hvQoWyEkQCP0+rR/WufvzYoMlM2y40pZh+hNd9eZCto2c1ebylkDY2rYw+KAsDbp4q4/H/7NTQqyfeB6BCBEt7eSKHCfjL1DxWqnBG+f32hF9qwMtXNFqsSjGXF3g07l1R8nrR1jPUAZCElBzWX9jp9ebNWkRAv8F1h/CCJDd+09 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 36df132e-311d-4c46-f4c5-08db82d08238 X-MS-Exchange-CrossTenant-AuthSource: SG2PR06MB5288.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 12:07:05.4726 (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: wwtpBFJLvIFfKIbdy4mEu3w5bbAo7HxJiBqzR6EXE0HJQSjGayt/SfCJJJL4SPR5Buo02+kBzYFksXOip+L0Aw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6499 Precedence: bulk List-ID: X-Mailing-List: linux-edac@vger.kernel.org Make IS_ERR() judge the debugfs_create_dir() function return in create_debugfs_nodes() Signed-off-by: Minjie Du --- drivers/ras/cec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ras/cec.c b/drivers/ras/cec.c index 321af498e..27db1ae9f 100644 --- a/drivers/ras/cec.c +++ b/drivers/ras/cec.c @@ -483,7 +483,7 @@ static int __init create_debugfs_nodes(void) struct dentry *d, *pfn, *decay, *count, *array; d = debugfs_create_dir("cec", ras_debugfs_dir); - if (!d) { + if (IS_ERR(d)) { pr_warn("Error creating cec debugfs node!\n"); return -1; }