OPP: fix error checking in opp_migrate_dentry()
authorQi Zheng <zhengqi.arch@bytedance.com>
Wed, 8 Feb 2023 04:00:37 +0000 (12:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:39:15 +0000 (09:39 +0100)
commitbf1b79d57e4478607d277efdff565c05b8fc438c
tree96c594e8c3ed6ee5cf1690774fac32df5c4c5766
parentdb6efde0ab809d68c0db9284aae8224317367206
OPP: fix error checking in opp_migrate_dentry()

[ Upstream commit eca4c0eea53432ec4b711b2a8ad282cbad231b4f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/opp/debugfs.c