summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2018-08-22 07:00:07 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-09-16 16:37:16 -0400
commitbe6b1dfe95eda70bd031dc03d420d022fd536d63 (patch)
tree7c9902373849fd1ee379ebc1f917bf8d21f33125
parent8f5be0ec23bb9ef3f96659c8dff1340b876600bf (diff)
drivers/base/devtmpfs.c: don't pretend path is const in delete_path
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>
-rw-r--r--drivers/base/devtmpfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c
index f7768077e817..b93fc862d365 100644
--- a/drivers/base/devtmpfs.c
+++ b/drivers/base/devtmpfs.c
@@ -252,7 +252,7 @@ static int dev_rmdir(const char *name)
252 252
253static int delete_path(const char *nodepath) 253static int delete_path(const char *nodepath)
254{ 254{
255 const char *path; 255 char *path;
256 int err = 0; 256 int err = 0;
257 257
258 path = kstrdup(nodepath, GFP_KERNEL); 258 path = kstrdup(nodepath, GFP_KERNEL);