diff options
author | Qi Zheng <zhengqi.arch@bytedance.com> | 2023-02-08 05:00:37 +0100 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2023-02-08 06:10:59 +0100 |
commit | eca4c0eea53432ec4b711b2a8ad282cbad231b4f (patch) | |
tree | dfebb4685e5f35a0168ab081f5cca2379b842ac0 /drivers/opp/debugfs.c | |
parent | dt-bindings: opp: v2-qcom-level: Let qcom,opp-fuse-level be a 2-long array (diff) | |
download | linux-eca4c0eea53432ec4b711b2a8ad282cbad231b4f.tar.xz linux-eca4c0eea53432ec4b711b2a8ad282cbad231b4f.zip |
OPP: fix error checking in opp_migrate_dentry()
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>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/opp/debugfs.c')
-rw-r--r-- | drivers/opp/debugfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |