PM: domains: no need to check return value of debugfs_create functions
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jan 2019 15:21:05 +0000 (16:21 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 23 Jan 2019 21:59:57 +0000 (22:59 +0100)
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c

index 500de1dee967bc201cbd5626f6b5b367267ece6d..45eafe8cf7dd78a2e65b0bce842d3e855172793e 100644 (file)
@@ -2948,18 +2948,11 @@ static int __init genpd_debug_init(void)
 
        genpd_debugfs_dir = debugfs_create_dir("pm_genpd", NULL);
 
-       if (!genpd_debugfs_dir)
-               return -ENOMEM;
-
-       d = debugfs_create_file("pm_genpd_summary", S_IRUGO,
-                       genpd_debugfs_dir, NULL, &summary_fops);
-       if (!d)
-               return -ENOMEM;
+       debugfs_create_file("pm_genpd_summary", S_IRUGO, genpd_debugfs_dir,
+                           NULL, &summary_fops);
 
        list_for_each_entry(genpd, &gpd_list, gpd_list_node) {
                d = debugfs_create_dir(genpd->name, genpd_debugfs_dir);
-               if (!d)
-                       return -ENOMEM;
 
                debugfs_create_file("current_state", 0444,
                                d, genpd, &status_fops);