aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing/coresight/coresight-cpu-debug.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <[email protected]>2019-06-18 15:52:46 +0000
committerGreg Kroah-Hartman <[email protected]>2019-06-21 13:46:30 +0000
commit200f3a3fec0c1efab6dcdadc18c65eb61b4c89ce (patch)
treedf5c0e9ae64bf552f92d31307f40254bd65f002b /drivers/hwtracing/coresight/coresight-cpu-debug.c
parentbtrfs: sysfs: Replace default_attrs in ktypes with groups (diff)
downloadkernel-200f3a3fec0c1efab6dcdadc18c65eb61b4c89ce.tar.gz
kernel-200f3a3fec0c1efab6dcdadc18c65eb61b4c89ce.zip
coresight: cpu-debug: 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. Cc: Suzuki K Poulose <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: [email protected] Reviewed-by: Mathieu Poirier <[email protected]> Tested-by: Mathieu Poirier <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-cpu-debug.c')
-rw-r--r--drivers/hwtracing/coresight/coresight-cpu-debug.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/hwtracing/coresight/coresight-cpu-debug.c b/drivers/hwtracing/coresight/coresight-cpu-debug.c
index e8819d750938..6446ed69ab2f 100644
--- a/drivers/hwtracing/coresight/coresight-cpu-debug.c
+++ b/drivers/hwtracing/coresight/coresight-cpu-debug.c
@@ -525,23 +525,12 @@ static const struct file_operations debug_func_knob_fops = {
static int debug_func_init(void)
{
- struct dentry *file;
int ret;
/* Create debugfs node */
debug_debugfs_dir = debugfs_create_dir("coresight_cpu_debug", NULL);
- if (!debug_debugfs_dir) {
- pr_err("%s: unable to create debugfs directory\n", __func__);
- return -ENOMEM;
- }
-
- file = debugfs_create_file("enable", 0644, debug_debugfs_dir, NULL,
- &debug_func_knob_fops);
- if (!file) {
- pr_err("%s: unable to create enable knob file\n", __func__);
- ret = -ENOMEM;
- goto err;
- }
+ debugfs_create_file("enable", 0644, debug_debugfs_dir, NULL,
+ &debug_func_knob_fops);
/* Register function to be called for panic */
ret = atomic_notifier_chain_register(&panic_notifier_list,