Skip to content

Commit be6b1df

Browse files
Villemoesgregkh
authored andcommitted
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>
1 parent 8f5be0e commit be6b1df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/base/devtmpfs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ static int dev_rmdir(const char *name)
252252

253253
static int delete_path(const char *nodepath)
254254
{
255-
const char *path;
255+
char *path;
256256
int err = 0;
257257

258258
path = kstrdup(nodepath, GFP_KERNEL);

0 commit comments

Comments
 (0)