Merge tag 'mmc-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
[linux-2.6-block.git] / drivers / mmc / core / debugfs.c
index 2797771a5fa8b033cd6a8d0a28f3ea502cc2d2be..09e0c765946917e77517ac41cb0f114152abee70 100644 (file)
@@ -227,45 +227,21 @@ void mmc_add_host_debugfs(struct mmc_host *host)
        struct dentry *root;
 
        root = debugfs_create_dir(mmc_hostname(host), NULL);
-       if (IS_ERR(root))
-               /* Don't complain -- debugfs just isn't enabled */
-               return;
-       if (!root)
-               /* Complain -- debugfs is enabled, but it failed to
-                * create the directory. */
-               goto err_root;
-
        host->debugfs_root = root;
 
-       if (!debugfs_create_file("ios", S_IRUSR, root, host, &mmc_ios_fops))
-               goto err_node;
-
-       if (!debugfs_create_x32("caps", S_IRUSR, root, &host->caps))
-               goto err_node;
-
-       if (!debugfs_create_x32("caps2", S_IRUSR, root, &host->caps2))
-               goto err_node;
-
-       if (!debugfs_create_file("clock", S_IRUSR | S_IWUSR, root, host,
-                       &mmc_clock_fops))
-               goto err_node;
+       debugfs_create_file("ios", S_IRUSR, root, host, &mmc_ios_fops);
+       debugfs_create_x32("caps", S_IRUSR, root, &host->caps);
+       debugfs_create_x32("caps2", S_IRUSR, root, &host->caps2);
+       debugfs_create_file("clock", S_IRUSR | S_IWUSR, root, host,
+                           &mmc_clock_fops);
 
 #ifdef CONFIG_FAIL_MMC_REQUEST
        if (fail_request)
                setup_fault_attr(&fail_default_attr, fail_request);
        host->fail_mmc_request = fail_default_attr;
-       if (IS_ERR(fault_create_debugfs_attr("fail_mmc_request",
-                                            root,
-                                            &host->fail_mmc_request)))
-               goto err_node;
+       fault_create_debugfs_attr("fail_mmc_request", root,
+                                 &host->fail_mmc_request);
 #endif
-       return;
-
-err_node:
-       debugfs_remove_recursive(root);
-       host->debugfs_root = NULL;
-err_root:
-       dev_err(&host->class_dev, "failed to initialize debugfs\n");
 }
 
 void mmc_remove_host_debugfs(struct mmc_host *host)
@@ -282,25 +258,9 @@ void mmc_add_card_debugfs(struct mmc_card *card)
                return;
 
        root = debugfs_create_dir(mmc_card_id(card), host->debugfs_root);
-       if (IS_ERR(root))
-               /* Don't complain -- debugfs just isn't enabled */
-               return;
-       if (!root)
-               /* Complain -- debugfs is enabled, but it failed to
-                * create the directory. */
-               goto err;
-
        card->debugfs_root = root;
 
-       if (!debugfs_create_x32("state", S_IRUSR, root, &card->state))
-               goto err;
-
-       return;
-
-err:
-       debugfs_remove_recursive(root);
-       card->debugfs_root = NULL;
-       dev_err(&card->dev, "failed to initialize debugfs\n");
+       debugfs_create_x32("state", S_IRUSR, root, &card->state);
 }
 
 void mmc_remove_card_debugfs(struct mmc_card *card)