From: Rasmus Villemoes Date: Wed, 22 Aug 2018 11:00:07 +0000 (+0200) Subject: drivers/base/devtmpfs.c: don't pretend path is const in delete_path X-Git-Tag: v4.20-rc1~108^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be6b1dfe95eda70bd031dc03d420d022fd536d63;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index f7768077e817b..b93fc862d3657 100644 --- 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) { - const char *path; + char *path; int err = 0; path = kstrdup(nodepath, GFP_KERNEL);