projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f5be0e
)
drivers/base/devtmpfs.c: don't pretend path is const in delete_path
author
Rasmus Villemoes
<linux@rasmusvillemoes.dk>
Wed, 22 Aug 2018 11:00:07 +0000
(13:00 +0200)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sun, 16 Sep 2018 20:37:16 +0000
(22:37 +0200)
path is the result of kstrdup, and we repeatedly call strrchr on it,
modifying it through the returned pointer. So there's no reason to
pretend path is const.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/devtmpfs.c
patch
|
blob
|
history
diff --git
a/drivers/base/devtmpfs.c
b/drivers/base/devtmpfs.c
index
f776807
..
b93fc86
100644
(file)
--- a/
drivers/base/devtmpfs.c
+++ b/
drivers/base/devtmpfs.c
@@
-252,7
+252,7
@@
static int dev_rmdir(const char *name)
static int delete_path(const char *nodepath)
{
- c
onst c
har *path;
+ char *path;
int err = 0;
path = kstrdup(nodepath, GFP_KERNEL);