Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp84759rwb; Fri, 4 Aug 2023 09:30:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFsxeLEh/RlkK8GwCS702Uv6sqmQsCNw8Qf5evD2rVwokgjiVTW0QQzrx8haghSnBw2Jee5 X-Received: by 2002:ac2:5e23:0:b0:4fe:5741:9eb9 with SMTP id o3-20020ac25e23000000b004fe57419eb9mr1558925lfg.49.1691166606262; Fri, 04 Aug 2023 09:30:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691166606; cv=none; d=google.com; s=arc-20160816; b=0MUkUcu5LsRnPVRXT5PZw5QzYrNGQADOrMIkUSbaJbgKrMED2no2nf2cLLOCXtgU9K 1hXfmD2PdZZFVzym8ZWrQjz/BCEzEDMUXJFxNiW8WVKZ/DtfZ7nocBu7/xXlzOc7/kSQ LGCNyeFzPjl5ykNOAeyFnRzFm1rtqXWy45mJGQY5GLeFiEPMz1ZuNTkfNFhpND+6owuA tM9w/90K8HnWyToutPW1cQ63Ictb6yUY6KFXEgptqKCmS1Nn5zlglS1lPVcFScO9e1HG 3H3OuZZ5o5Oyyqmc6P0XAQB9TQUcN8EmqEsAFMMkDpaPDFhCJgldyVSsv8jkMWuHuUEH HF3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=FF7sikeMIUjyV0JfvtAwEyLQ5NmbQEmDgxlbVCbc4y4=; fh=NkhmYwSkuyYyxnDFHpy/loZDLg/7fEL5olgwE9f0zE8=; b=mNBmoqVeubd9ztQzduwArKdGZz616I9Q9lQQn2RGY0So48zBmRuqP0X5JJ1OiZzpyk dlXRi/ZgemcS7//Cw0jaju1jZGGRtIBcZ0ogytR2ao5UwxuKgxBnXTQW7UYOmRa1BiIx kh6VYuXVkyOdfx2f6ZZL+PFtX6a/1ioU98QdGM8bfydDWiEt3AdmdmzajXYPvwTnvxNP DhxobH5z/e5RzFk9qT8b+zGnidcX469UkQwZ/9Ll7ysFiCANtPPZZn7ZDZyHcR8llTwR ektAdTgPbqg4Hk30iBn7cDWJ6nbgETsMqeuRhRPrGap3A/h9mCOtcNCg/D0thyi94yl9 WwZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zOvQH9eK; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f10-20020a056402068a00b0051a5a6676dfsi1186863edy.23.2023.08.04.09.29.36; Fri, 04 Aug 2023 09:30:06 -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=@linuxfoundation.org header.s=korg header.b=zOvQH9eK; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230481AbjHDOIh (ORCPT + 99 others); Fri, 4 Aug 2023 10:08:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229836AbjHDOIg (ORCPT ); Fri, 4 Aug 2023 10:08:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EE0C122 for ; Fri, 4 Aug 2023 07:08:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F05106203B for ; Fri, 4 Aug 2023 14:08:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2219C433C8; Fri, 4 Aug 2023 14:08:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1691158114; bh=+WRwdztfVvcvK11PPGu/GvYQB8UyGhjPYg5JNWjkmuE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=zOvQH9eKGm5yKantARn9GqkzE/2/NdGn4CG1NNT0G7JcabMtLQMpi9N/suBj6DnlB /4ZS4q5uQLo6B9qLtK78X3QtGbDsxLtB76XD7bOoFFzOYn4oprQ3/1dEmS8ayMPF4k +EMeV3qQxVEd1uTO9zR6nsY0sjQ01xGpa3rQj+PE= Date: Fri, 4 Aug 2023 16:08:31 +0200 From: Greg Kroah-Hartman To: Wang Ming Cc: Liu Shixin , Rob Herring , linux-kernel@vger.kernel.org, opensource.kernel@vivo.com Subject: Re: [PATCH v1] bus:Fix error checking for debugfs_create_dir() in mvebu_mbus_debugfs_init() Message-ID: <2023080418-mower-bubbly-d573@gregkh> References: <20230712132343.8802-1-machel@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230712132343.8802-1-machel@vivo.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,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 On Wed, Jul 12, 2023 at 09:23:28PM +0800, Wang Ming wrote: > debugfs_create_dir() does not return NULL,but it is > possible to return error pointer. Most incorrect error checks > were fixed,but the one in mvebu_mbus_debugfs_init() was forgotten. > > Fix the remaining error check. > > Signed-off-by: Wang Ming > --- > drivers/bus/mvebu-mbus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c > index 00cb792bda18..4c514894cc1f 100644 > --- a/drivers/bus/mvebu-mbus.c > +++ b/drivers/bus/mvebu-mbus.c > @@ -993,7 +993,7 @@ static __init int mvebu_mbus_debugfs_init(void) > return 0; > > s->debugfs_root = debugfs_create_dir("mvebu-mbus", NULL); > - if (s->debugfs_root) { > + if (!IS_ERR(s->debugfs_root)) { No need for this check at all. thanks, greg k-h