From: Johannes Berg <johannes@sipsolutions.net>
To: yingsha xu <ysxu@hust.edu.cn>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Jiri Benc <jbenc@suse.cz>,
"John W. Linville" <linville@tuxdriver.com>
Cc: hust-os-kernel-patches@googlegroups.com,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: mac80211: use IS_ERR to check return value
Date: Tue, 18 Apr 2023 10:36:14 +0200 [thread overview]
Message-ID: <f23c038b2b586a45a8b3c757495d5bb51ee4ac7e.camel@sipsolutions.net> (raw)
In-Reply-To: <20230416083028.14044-1-ysxu@hust.edu.cn>
On Sun, 2023-04-16 at 16:30 +0800, yingsha xu wrote:
> According to the annotation of function debugfs_create_fs, if
> an error occurs, ERR_PTR(-ERROR) will be returned instead of
> a null pointer or zero value.
>
> Fix it by using IS_ERR().
I don't this this is right, or fixed anything ...
If debugfs indeed returned an ERR_PTR() value, then the later debugfs
adds will do nothing.
Since it doesn't look like debugfs_create_dir() can actually return NULL
these days (not sure it ever could), I guess we can even remove the
check.
But you could've just read the comment there too, to know what the NULL
check was about ...
johannes
next prev parent reply other threads:[~2023-04-18 8:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-16 8:30 [PATCH] net: mac80211: use IS_ERR to check return value yingsha xu
2023-04-18 8:36 ` Johannes Berg [this message]
2023-04-19 11:23 ` Dan Carpenter
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=f23c038b2b586a45a8b3c757495d5bb51ee4ac7e.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hust-os-kernel-patches@googlegroups.com \
--cc=jbenc@suse.cz \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=ysxu@hust.edu.cn \
/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;
as well as URLs for NNTP newsgroup(s).