public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Wang Ming <machel@vivo.com>
Cc: Liu Shixin <liushixin2@huawei.com>, Rob Herring <robh@kernel.org>,
	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()
Date: Fri, 4 Aug 2023 16:08:31 +0200	[thread overview]
Message-ID: <2023080418-mower-bubbly-d573@gregkh> (raw)
In-Reply-To: <20230712132343.8802-1-machel@vivo.com>

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 <machel@vivo.com>
> ---
>  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

      reply	other threads:[~2023-08-04 14:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12 13:23 [PATCH v1] bus:Fix error checking for debugfs_create_dir() in mvebu_mbus_debugfs_init() Wang Ming
2023-08-04 14:08 ` Greg Kroah-Hartman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2023080418-mower-bubbly-d573@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liushixin2@huawei.com \
    --cc=machel@vivo.com \
    --cc=opensource.kernel@vivo.com \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox