From: Jay Vosburgh <jay.vosburgh@canonical.com>
To: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: gregkh@linuxfoundation.org, rafael@kernel.org, vfalico@gmail.com,
andy@greyhouse.net, vireshk@kernel.org, nm@ti.com,
sboyd@kernel.org, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 2/3] bonding: fix error checking in bond_debug_reregister()
Date: Thu, 02 Feb 2023 10:41:37 -0800 [thread overview]
Message-ID: <20121.1675363297@famine> (raw)
In-Reply-To: <20230202093256.32458-3-zhengqi.arch@bytedance.com>
Qi Zheng <zhengqi.arch@bytedance.com> wrote:
>Since commit ff9fb72bc077 ("debugfs: return error values,
>not NULL") changed return value of debugfs_rename() in
>error cases from %NULL to %ERR_PTR(-ERROR), we should
>also check error values instead of NULL.
>
>Fixes: ff9fb72bc077 ("debugfs: return error values, not NULL")
>Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>
>---
> drivers/net/bonding/bond_debugfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/net/bonding/bond_debugfs.c b/drivers/net/bonding/bond_debugfs.c
>index 4f9b4a18c74c..594094526648 100644
>--- a/drivers/net/bonding/bond_debugfs.c
>+++ b/drivers/net/bonding/bond_debugfs.c
>@@ -76,7 +76,7 @@ void bond_debug_reregister(struct bonding *bond)
>
> d = debugfs_rename(bonding_debug_root, bond->debug_dir,
> bonding_debug_root, bond->dev->name);
>- if (d) {
>+ if (!IS_ERR(d)) {
> bond->debug_dir = d;
> } else {
> netdev_warn(bond->dev, "failed to reregister, so just unregister old one\n");
>--
>2.20.1
>
next prev parent reply other threads:[~2023-02-02 18:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 9:32 [PATCH 0/3] some minor fixes of error checking about debugfs_rename() Qi Zheng
2023-02-02 9:32 ` [PATCH 1/3] debugfs: update comment of debugfs_rename() Qi Zheng
2023-02-02 9:32 ` [PATCH 2/3] bonding: fix error checking in bond_debug_reregister() Qi Zheng
2023-02-02 18:41 ` Jay Vosburgh [this message]
2023-02-02 9:32 ` [PATCH 3/3] PM/OPP: fix error checking in opp_migrate_dentry() Qi Zheng
2023-02-04 3:30 ` [PATCH 0/3] some minor fixes of error checking about debugfs_rename() patchwork-bot+netdevbpf
2023-02-07 10:30 ` Qi Zheng
2023-02-07 18:31 ` Jakub Kicinski
2023-02-08 2:51 ` Qi Zheng
2023-02-08 11:54 ` Greg Kroah-Hartman
2023-02-08 12:05 ` Qi Zheng
2023-02-11 9:06 ` Greg Kroah-Hartman
2023-02-11 9:12 ` Qi Zheng
2023-02-16 12:49 ` Greg Kroah-Hartman
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=20121.1675363297@famine \
--to=jay.vosburgh@canonical.com \
--cc=andy@greyhouse.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nm@ti.com \
--cc=rafael@kernel.org \
--cc=sboyd@kernel.org \
--cc=vfalico@gmail.com \
--cc=vireshk@kernel.org \
--cc=zhengqi.arch@bytedance.com \
/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).