提交 e16a42c3 编写于 作者: G Greg Kroah-Hartman 提交者: Rafael J. Wysocki

PM: domains: no need to check return value of debugfs_create functions

When calling debugfs functions, there is no need to ever check the
return value.  The function can work or not, but the code logic should
never do something different based on this.
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 49a57857
...@@ -2948,18 +2948,11 @@ static int __init genpd_debug_init(void) ...@@ -2948,18 +2948,11 @@ static int __init genpd_debug_init(void)
genpd_debugfs_dir = debugfs_create_dir("pm_genpd", NULL); genpd_debugfs_dir = debugfs_create_dir("pm_genpd", NULL);
if (!genpd_debugfs_dir) debugfs_create_file("pm_genpd_summary", S_IRUGO, genpd_debugfs_dir,
return -ENOMEM; NULL, &summary_fops);
d = debugfs_create_file("pm_genpd_summary", S_IRUGO,
genpd_debugfs_dir, NULL, &summary_fops);
if (!d)
return -ENOMEM;
list_for_each_entry(genpd, &gpd_list, gpd_list_node) { list_for_each_entry(genpd, &gpd_list, gpd_list_node) {
d = debugfs_create_dir(genpd->name, genpd_debugfs_dir); d = debugfs_create_dir(genpd->name, genpd_debugfs_dir);
if (!d)
return -ENOMEM;
debugfs_create_file("current_state", 0444, debugfs_create_file("current_state", 0444,
d, genpd, &status_fops); d, genpd, &status_fops);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册