All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qi Zheng <zhengqi.arch@bytedance.com>
To: gregkh@linuxfoundation.org, rafael@kernel.org,
	j.vosburgh@gmail.com, vfalico@gmail.com, andy@greyhouse.net,
	vireshk@kernel.org, nm@ti.com, sboyd@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	netdev@vger.kernel.org, Qi Zheng <zhengqi.arch@bytedance.com>
Subject: [PATCH 3/3] PM/OPP: fix error checking in opp_migrate_dentry()
Date: Thu,  2 Feb 2023 17:32:56 +0800	[thread overview]
Message-ID: <20230202093256.32458-4-zhengqi.arch@bytedance.com> (raw)
In-Reply-To: <20230202093256.32458-1-zhengqi.arch@bytedance.com>

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>
---
 drivers/opp/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/opp/debugfs.c b/drivers/opp/debugfs.c
index 96a30a032c5f..2c7fb683441e 100644
--- a/drivers/opp/debugfs.c
+++ b/drivers/opp/debugfs.c
@@ -235,7 +235,7 @@ static void opp_migrate_dentry(struct opp_device *opp_dev,
 
 	dentry = debugfs_rename(rootdir, opp_dev->dentry, rootdir,
 				opp_table->dentry_name);
-	if (!dentry) {
+	if (IS_ERR(dentry)) {
 		dev_err(dev, "%s: Failed to rename link from: %s to %s\n",
 			__func__, dev_name(opp_dev->dev), dev_name(dev));
 		return;
-- 
2.20.1


  parent reply	other threads:[~2023-02-02  9:34 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
2023-02-02  9:32 ` Qi Zheng [this message]
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=20230202093256.32458-4-zhengqi.arch@bytedance.com \
    --to=zhengqi.arch@bytedance.com \
    --cc=andy@greyhouse.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=j.vosburgh@gmail.com \
    --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 \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.