Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp37352773rwd; Tue, 11 Jul 2023 13:04:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlH+coHSUtxhxJ+zCuGtm11sPyC+2vHJA6sS20cgNI4OH4x4f6sDkMl3pCEIsCGFi9g/O6Rn X-Received: by 2002:a05:6a20:14b:b0:12f:c0c1:d70 with SMTP id 11-20020a056a20014b00b0012fc0c10d70mr11238099pzs.40.1689105840990; Tue, 11 Jul 2023 13:04:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689105840; cv=none; d=google.com; s=arc-20160816; b=QmrwSdO4ArOo8c+x113JtnzZFJatPOv6GpzpFHzGGd8TlIG4kSafQiNbVA5g3JM+yL +tGZuzItNfukkfG8dZEJ/AX/xrfZKVGReXaORjWY/HvSgt/tu6jO4qYiWQGGPgfj4Tsp y0j5bpXtODC9W/R3o7QoaLpi2P8oop6wvGk/ZRVlBL4lDU6ldasuVIq2DwEGcRX8Hp3z zqz9m2810hLpezeSfdgnLDXV8saJZ4kXmwDf88BXwJOXWoN3N9m6dvnsqWSQLMSW3qFv z2wNANEgzQt8peHtWtCK3XGMA+pH+iiq4kKmWfYEILBoJVE3jluTvfPFof2KAQRw9jrn Fk4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=1Cv6loIqwGzGXX1myECWKDvmI7cXXUoeUWYnDFsHsC0=; fh=48zufIs0lB45bwBXVvc750EwJHsn5+h1qIJefrD2lhU=; b=Als3lBjEpbQK5Vi8lVisaf6mDp698s165e0pDuC3J0ZuL98srSNEgt1zeOfbk9lKgX BjlpU46C6AbmxoWIq4TPdVkC4X3q1jQDxrFTVMGrsJqljqycNY+Vy/JuDwlIlzXCCoxR JKX4aXao7R6pCWjogt53nCiaIwJRia5YVXhIjMJc3yA1xHYeKXe5KkY7LsUow70IocCJ c2BH3gjEP1Gl2pXFERI2+NNjwSkxVfQZfDPDdffc52Q9pS3hg9ZGXGe0BLFbJp77CLfJ H6apo5UEfS4Y/rQ4SI+YekbMfQ7RouW+DKYCiJwWHUGqSu+8eUNenHEMu32KWUjHBISU 6mlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=cBe1Y9vy; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y8-20020a056a00180800b0067d77ec0d2csi1988879pfa.123.2023.07.11.13.03.48; Tue, 11 Jul 2023 13:04:00 -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=@infradead.org header.s=bombadil.20210309 header.b=cBe1Y9vy; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229766AbjGKTdO (ORCPT + 99 others); Tue, 11 Jul 2023 15:33:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230215AbjGKTdN (ORCPT ); Tue, 11 Jul 2023 15:33:13 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72E0610D2 for ; Tue, 11 Jul 2023 12:33:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=1Cv6loIqwGzGXX1myECWKDvmI7cXXUoeUWYnDFsHsC0=; b=cBe1Y9vyYrSamoAfyxiK5PDX3H w4K5LsEzm7iIkn/MQUbQ5L7eDGuJ5MeBuAtRS1ZBTwx064Jf+M1qYshtk6FEm+6EvkBK3NXVv+VhT 6w9i+hmQnvcUbltYzTxdSeGx7ArBWAWwU9eL2kltUB5rjNs+csrY+GiQCf8aroTGF46v9pt/+OkUf jJglmqzIktYld4H2ZWs4/wHZwsyU8TGjAbBrTPCvOGAMOLDHtSfERY7PZwZm1TAgl0qJUg0plN8TN GE8B1QJbREl1VJeqSQ3bue/WQvME8Uop0tI9CcWWTWNNJyA7g4sL9Wo4HWAaBzMY7f21eEsqMrCdg QtyxD7rQ==; Received: from [2601:1c2:980:9ec0::2764] by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qJJ6l-00FkZw-30; Tue, 11 Jul 2023 19:33:11 +0000 Message-ID: <5469d33c-8b23-79b0-3815-163908cffb40@infradead.org> Date: Tue, 11 Jul 2023 12:33:11 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v2] lib:Fix more error checking for debugfs_create_dir() Content-Language: en-US To: Wang Ming , linux-kernel@vger.kernel.org Cc: opensource.kernel@vivo.com References: <20230711111727.2672-1-machel@vivo.com> From: Randy Dunlap In-Reply-To: <20230711111727.2672-1-machel@vivo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,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 Hi-- On 7/11/23 04:16, Wang Ming wrote: > In case of failure, debugfs_create_dir() does not return NULL, > but an error pointer. Most incorrect error checks were fixed, > but the one in test_fpu_init() was forgotten. > > Fix the remaining error check. > > Signed-off-by: Wang Ming You need to send this to some maintainer who can merge it, so please an appropriate maintainer to send it to. Thanks. > --- > lib/test_fpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/test_fpu.c b/lib/test_fpu.c > index e82db19fed84..5d6aa4691b4a 100644 > --- a/lib/test_fpu.c > +++ b/lib/test_fpu.c > @@ -69,7 +69,7 @@ static struct dentry *selftest_dir; > static int __init test_fpu_init(void) > { > selftest_dir = debugfs_create_dir("selftest_helpers", NULL); > - if (!selftest_dir) > + if (IS_ERR(selftest_dir)) > return -ENOMEM; > > debugfs_create_file_unsafe("test_fpu", 0444, selftest_dir, NULL, -- ~Randy