aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/dmatest.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-07-23 11:36:47 -0400
committerDan Williams <djbw@fb.com>2013-08-23 01:57:33 -0400
commite24775e41ffc59d9ae8c1f2a9a4ff9f79db0e573 (patch)
tree8419ff7f938e53c569ce87881ad559e1ec6036ea /drivers/dma/dmatest.c
parenta6c268d033b1f363e0d76c0483a0f99266542820 (diff)
dmatest: remove IS_ERR_OR_NULL checks of debugfs calls
There is a really little chance when we are able to create a directory and are not able to create nodes under it. So, this patch just removes those checks. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dan Williams <djbw@fb.com>
Diffstat (limited to 'drivers/dma/dmatest.c')
-rw-r--r--drivers/dma/dmatest.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 91716f404c03..eae598986b81 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -1131,7 +1131,6 @@ static const struct file_operations dtf_results_fops = {
1131static int dmatest_register_dbgfs(struct dmatest_info *info) 1131static int dmatest_register_dbgfs(struct dmatest_info *info)
1132{ 1132{
1133 struct dentry *d; 1133 struct dentry *d;
1134 int ret = -ENOMEM;
1135 1134
1136 d = debugfs_create_dir("dmatest", NULL); 1135 d = debugfs_create_dir("dmatest", NULL);
1137 if (IS_ERR(d)) 1136 if (IS_ERR(d))
@@ -1142,24 +1141,18 @@ static int dmatest_register_dbgfs(struct dmatest_info *info)
1142 info->root = d; 1141 info->root = d;
1143 1142
1144 /* Run or stop threaded test */ 1143 /* Run or stop threaded test */
1145 d = debugfs_create_file("run", S_IWUSR | S_IRUGO, info->root, 1144 debugfs_create_file("run", S_IWUSR | S_IRUGO, info->root, info,
1146 info, &dtf_run_fops); 1145 &dtf_run_fops);
1147 if (IS_ERR_OR_NULL(d))
1148 goto err_node;
1149 1146
1150 /* Results of test in progress */ 1147 /* Results of test in progress */
1151 d = debugfs_create_file("results", S_IRUGO, info->root, info, 1148 debugfs_create_file("results", S_IRUGO, info->root, info,
1152 &dtf_results_fops); 1149 &dtf_results_fops);
1153 if (IS_ERR_OR_NULL(d))
1154 goto err_node;
1155 1150
1156 return 0; 1151 return 0;
1157 1152
1158err_node:
1159 debugfs_remove_recursive(info->root);
1160err_root: 1153err_root:
1161 pr_err("dmatest: Failed to initialize debugfs\n"); 1154 pr_err("dmatest: Failed to initialize debugfs\n");
1162 return ret; 1155 return -ENOMEM;
1163} 1156}
1164 1157
1165static int __init dmatest_init(void) 1158static int __init dmatest_init(void)