Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp493369rwd; Sun, 14 May 2023 00:24:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ44Rln02TqvR4htWtPPRgK3eAYWRgOyjJlrZ6xF4SdRWsBjOK7Ft0USXaD6qp/WDbaDV3BY X-Received: by 2002:a17:90a:a595:b0:247:14ac:4d3a with SMTP id b21-20020a17090aa59500b0024714ac4d3amr34705481pjq.20.1684049059469; Sun, 14 May 2023 00:24:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684049059; cv=pass; d=google.com; s=arc-20160816; b=M+weNEYG+zLBs1X0X7gqfxZGQZXTY7E9hE2mPS1JHEGCbs9YrYBH3uaTNpQJur7qsQ G/Qs3nHgUAevfoUjLHRJOI+InkAVQctqrPUMkPrcB3/0r/WThYIcEzg/ikuge4mVVPVp gCR7eCkEJrL6KYvkWgib4vlSR/qGzetSA+0X40dDx0u8raZBUQgDbrMlMW5Q8Uj/2wYU NpzLSsTtM1bwhTzVCYF00xehPoCW3bMLepOupP2VJ/yhZUvrBC1MCrysq/1u293nCSEn 4ffGyg596xisZk1Ug+T6Ld94bHpgD1Ym7zd/7fA9P/Ppk5TjctkN9Vs1mbwF0kehWgpK PhxQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kFojvHt4yblPll/23JiNXv0wkZ0S8N5BnD9OglZLvXE=; b=OPi3jU2oA3yHcQg/3gp3WhsO3YmFJUCmjYXGg3TDVp+nlzsYCh4BQZWJxksHT43Lrf PtJGIgakf8YfRCzl1FJTSlvJicTamIA/V3RF64FQdWoTTJqO8qUKrZiTZs1GBeApGSXJ OMGNGXdtJKw+3xqJKjABC8zjdrKROV5q+fvYsQHKx6vM0xA+2lBkj1Yvt0s+fOh9+MvF A58JDqAuPWszwzpR0/wwLYCx2eQNW9sTCkALTLWsk8/tovg/Ycgv1N7aS2bRSSVmQgxH vRfQ/68hfpWjqZ0Nl3IOkp+/3vUYORCJvglBRLHjcm0YPrMqdI3oZOdnmrG8NW3vsorp dQDA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@outlook.com header.s=selector1 header.b="BBtN/H1a"; arc=pass (i=1); 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=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v6-20020a17090abb8600b0025049be6267si19765893pjr.133.2023.05.14.00.24.04; Sun, 14 May 2023 00:24:19 -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=@outlook.com header.s=selector1 header.b="BBtN/H1a"; arc=pass (i=1); 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=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229834AbjENGoc (ORCPT + 99 others); Sun, 14 May 2023 02:44:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjENGoa (ORCPT ); Sun, 14 May 2023 02:44:30 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10olkn2097.outbound.protection.outlook.com [40.92.40.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F39E1FED for ; Sat, 13 May 2023 23:44:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=E5k+u/Gy1kZ81DYPgtQdnNQuWEzukYXSmDHF9hzEBEdwY8VHIJPo1xMRDnj2nsJ3pAWp3WPRVI0pn26lSYqOZbEhGXM/nPy2vaKnltaZYJiztB46FvBmihSsAif0Vflgb94qoVPeOxZ/Db7TVwziqDETO8JG9UFjkDycpEFCCJg2ge9VgV1Jib+APUAnC+5+iPyufmfKfMtr7pLM3JWNy5eysuojZmaUcujIQnzOLt9XwVxPeILYz/oo5cIoZ6Bl57tNdFnleFg9Fd+1kiunA8tsY+2gK0KmdmsPKYFnTiizaNgKwbX4Uda7Lh/eac5zXgzOduHtT8JdYcLyc2dx5w== 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=kFojvHt4yblPll/23JiNXv0wkZ0S8N5BnD9OglZLvXE=; b=c5IvapCNTOVLv7jVQ54pNi44CBlrgngd6YeWuvyuu3s7h0Nyv84mD7Mf4G2jIQmlvqJRXGqPy9Dvm2GzE1u/ztc5WXA2f31p2ZxYOoEFPT+ztqopFZ3y9DFsSwxjCIYpaLyCmBsIx9bsORmC77/9ZbKz3byCWpuTvEmoUa8cFlYZCZZQoImE4wSoDUkcQkGvlhpTuJTBFXhMRjcrjQSjO54QZDn54b5ywtN9RhooXE0lYre9FPoDT87Vvfiss4YYomuiBI8m2oIeEsiy7jKCK4GOwmavMwnU+lzlZ1OKwF8m6XF2cbKScWymGBmaGv3FQrGfeu5BCsiRlcX8Q0IuRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kFojvHt4yblPll/23JiNXv0wkZ0S8N5BnD9OglZLvXE=; b=BBtN/H1aATFwMgr/th31JvWPG4jU2AZLiiiy4y0r0rDi7y+fHvFWTe/+hzEhqQeoO0wpNgALY1hXrrj7tetPCD0k+p+eAi0OToAHjOSd5RlgpjPUZfv3sqngSL+cHrHRR9WlttI1u3qxmW3RU0USPLiBltF5uG2ZW3EcvSvBToEeq5oaMyhy9qct8XNRmsO5hgUkueW1CWNFzDM9C2Hwmgr2/aNSdbLJyw38jfai1Y46zcWYS7Uu7YTpQoVsBwvIrDAZUIL0bYAkGy5aLv2/4kSEcsS0ia4LywVa675FX5QZUYzCLJMy/r9mStHxP/CJS6LCvKBngeiqrRUJ6XtBBw== Received: from CY5PR12MB6455.namprd12.prod.outlook.com (2603:10b6:930:35::10) by CH3PR12MB9077.namprd12.prod.outlook.com (2603:10b6:610:1a2::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.29; Sun, 14 May 2023 06:44:27 +0000 Received: from CY5PR12MB6455.namprd12.prod.outlook.com ([fe80::eece:c2b8:c7ea:a6]) by CY5PR12MB6455.namprd12.prod.outlook.com ([fe80::eece:c2b8:c7ea:a6%5]) with mapi id 15.20.6387.029; Sun, 14 May 2023 06:44:27 +0000 From: mirimmad@outlook.com To: chenhuacai@kernel.org Cc: ivan.orlov0322@gmail.com, kernel@xen0n.name, linux-kernel@vger.kernel.org, loongarch@lists.linux.dev, mirimmad17@gmail.com, mirimmad@outlook.com, skhan@linuxfoundation.org Subject: [PATCH v2] loongarch: fix debugfs_create_dir error checking Date: Sun, 14 May 2023 12:13:46 +0530 Message-ID: X-Mailer: git-send-email 2.40.0 In-Reply-To: References: Content-Transfer-Encoding: 8bit Content-Type: text/plain X-TMN: [IVcKfHWj8F5gRP9FLvLf7qeOVNpJFIHJbBhVex5aIJ4cH29cjop6+hiQnK+1mI/o] X-ClientProxiedBy: PN2PR01CA0214.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:ea::9) To CY5PR12MB6455.namprd12.prod.outlook.com (2603:10b6:930:35::10) X-Microsoft-Original-Message-ID: <20230514064346.12744-1-mirimmad@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY5PR12MB6455:EE_|CH3PR12MB9077:EE_ X-MS-Office365-Filtering-Correlation-Id: cbcabdf3-8e96-49ee-fc84-08db5446a972 X-MS-Exchange-SLBlob-MailProps: ScCmN3RHayH7ocfjk3L3dZBU/GwNzE2mxiG5SoRpMefMvLHfDuFax19edQ8/iL4YCvPKOSu06PvoasGFbLxvFJMdjxsn0WBv3dZUiLXnBjC81RxbUB2IkREtS2ofBiaCLOyNt5+f/k6bmmVPPTIuVe/snZAA8/jOcHFAY5aQqkepKg9OKHOZBG5ksZeeGJGOzUKh9S8eb1Ekp06dL+coxwBFaHv4XX3h3j5p2exPHpIO8kwMY1AugXpXPWTVXayqSwgtfdHM13JkzM35nQaXDvVGqsrKyK9tz6cIxRxcjy6ylmQtbSP5mlcL0EFEaXAbNPVbj9yMxnGHTWjPabpr61/F5Gj3bLbxJyESqgGpg3L22FIuelt8dSg/EJcct8uf+Zl3Zp/1QzP9sllTYvHDCUN0HzL6uhKcVrK4QJ798hwem4q0C2awms3sAZdHngD3vGUu1lQWHYbU9rarRTcQYMHXGQXOBfdC5/wyKYo7aroB/4I60DEOUNrszRkB4jtL//jbkI4Pefj/wnhLQT+WgG2can5zgZ2KUz1rjkFnIB48Gy+7TN960fTeEC8+3bu61bUlHOKx5IQxUg6tiaImdAl6ot7lKs2WXMZ5wGnWjqf7jgKqBvnh4MYPLQZgWmc5t4G46X2tRVY138i7aEtPj31BcLRGkso0g3s+CzCvESbEgTxGZjGt4bESvZnWNduvH94vR4PvoD6loDnAdhXWtjp7McNoY8XB3l307X+NPnM= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ArddcTdAKrc7SGAXsHX6vaKZbO0uM+BFGv+AkUO/Rnr22UaHC/vCv50TYUviXyIFW/NM0FZg1rjm1zIfs+Z4wIjjRiCGvU0+q4d43aSWtFmmMj0563yZV9KCw0KLzis2VApIXk39fifoISoTB/deW/vkCfaD+nRnCwR8pFSglxTTRC+BVsWmDAMqQIM9yG1SUUxHhbzLio2MICuLKrbL31x7AwfMFxci1A3Owo3kA8W+YxqLNXdkXDYsNYcOnVwoscxXFk15HbFSLgQWwGqIVWzgOFt39yn1+AornaCAohiixJVDSvZZhTwU1d5W7HCt8mgjxK6XsacEHO8JJ5JYRDVJmBWmPr+ZtAtLTRW/jLm4SNb7YFImKgOr9xWQTgSgt2Q+nqBMQoLyQ0AfhpI2Okbm+0u/EStTgU9T2PNVZ6ICfJaPAB7NYWB0Xz7gtwWjIc0MJ8f5Npi3jIFhVVht+mxlS9smlMXJ9HJxXs2Ot/qlCzZ7zadRUPpn6oIKpZqUx8G89XY4HzJUX+l5TkSfMgmHW4fIVAfv4HUifGTFWAI2eaxME8lS2ORufh6Ijjv+13s5KYIlA2AyGhCss0zdjwD14BGU/jZFTk7GXtKkw6yY6BxQOTGtqgNfrYE72UtQ X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?gIUCl6Q9Rpznz7mwyU3wpQHYT/nmB0B/rs2CL+MB0MIByE38vMPdK3cemprP?= =?us-ascii?Q?VxXdeTpYaLMEFgM/umiTWfr3zPxM57xni4xoy/iBpnDWPFx5KCN3bCrzRhuT?= =?us-ascii?Q?jefSI/7fmlWRmdxPO1eX+wxFTb/doySDVLnyTLmUw0Lj1JYsEob3AwBEjgNJ?= =?us-ascii?Q?Rk1KJuK0lUns3QWbHlgkLkBdVDyedgkzi+KMWgj+sVkhf4EM+1s66iO1M1Ai?= =?us-ascii?Q?stc5/BokxIBobIMUL5VlObgG9yyL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8hI102oATS0+ZQSdofpcFwtl94j6O784ra/NJblXKCDTodKIkknfNbwPNBqi?= =?us-ascii?Q?RsEnmGgsh7vHgKNHtl+hbtFoNtVula6Jv09Rdi0El7Mef+9HLNntljnRYJOZ?= =?us-ascii?Q?G5Ph5zdDVXSAwv+RHyv89HT67RgHr1N+3FE9jeH4Dg=3D=3D?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cbcabdf3-8e96-49ee-fc84-08db5446a972 X-MS-Exchange-CrossTenant-AuthSource: CY5PR12MB6455.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 May 2023 06:44:27.6441 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9077 X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SORTED_RECIPS,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 From: Immad Mir The debugfs_create_dir returns ERR_PTR incase of an error and the correct way of checking it by using the IS_ERR_OR_NULL inline function, and not the simple null comparision. This patch fixes this. Suggested-By: Ivan Orlov Signed-off-by: Immad Mir --- arch/loongarch/kernel/unaligned.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/loongarch/kernel/unaligned.c b/arch/loongarch/kernel/unaligned.c index bdff825d2..85fae3d2d 100644 --- a/arch/loongarch/kernel/unaligned.c +++ b/arch/loongarch/kernel/unaligned.c @@ -485,7 +485,7 @@ static int __init debugfs_unaligned(void) struct dentry *d; d = debugfs_create_dir("loongarch", NULL); - if (!d) + if (IS_ERR_OR_NULL(d)) return -ENOMEM; debugfs_create_u32("unaligned_instructions_user", -- 2.40.0