projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13610aa
)
kcov: no need to check return value of debugfs_create functions
author
Greg Kroah-Hartman
<
[email protected]
>
Fri, 8 Mar 2019 00:29:56 +0000
(16:29 -0800)
committer
Linus Torvalds
<
[email protected]
>
Fri, 8 Mar 2019 02:32:02 +0000
(18:32 -0800)
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.
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
Cc: Andrey Ryabinin <
[email protected]
>
Cc: Mark Rutland <
[email protected]
>
Cc: Arnd Bergmann <
[email protected]
>
Cc: "Steven Rostedt (VMware)" <
[email protected]
>
Cc: Dmitry Vyukov <
[email protected]
>
Cc: Anders Roxell <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
kernel/kcov.c
patch
|
blob
|
history
diff --git
a/kernel/kcov.c
b/kernel/kcov.c
index c2277dbdbfb148842b855a942678e1218d891e07..5b0bb281c1a0cf29771dc9090638d46bdf8f7522 100644
(file)
--- a/
kernel/kcov.c
+++ b/
kernel/kcov.c
@@
-444,10
+444,8
@@
static int __init kcov_init(void)
* there is no need to protect it against removal races. The
* use of debugfs_create_file_unsafe() is actually safe here.
*/
- if (!debugfs_create_file_unsafe("kcov", 0600, NULL, NULL, &kcov_fops)) {
- pr_err("failed to create kcov in debugfs\n");
- return -ENOMEM;
- }
+ debugfs_create_file_unsafe("kcov", 0600, NULL, NULL, &kcov_fops);
+
return 0;
}