Commit eca4c0ee authored by Qi Zheng's avatar Qi Zheng Committed by Viresh Kumar

OPP: fix error checking in opp_migrate_dentry()

Since commit ff9fb72b ("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: ff9fb72b ("debugfs: return error values, not NULL")
Signed-off-by: default avatarQi Zheng <zhengqi.arch@bytedance.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 68d8ad3b
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment