Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89384f64 authored by Fabian Frederick's avatar Fabian Frederick Committed by Brian Norris
Browse files

mtd: phram: replace kmalloc/strcpy by kstrdup



Cc: Joern Engel <joern@lazybastard.org>
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 1360246a
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -181,12 +181,10 @@ static int parse_name(char **pname, const char *token)
	if (len > 64)
		return -ENOSPC;

	name = kmalloc(len, GFP_KERNEL);
	name = kstrdup(token, GFP_KERNEL);
	if (!name)
		return -ENOMEM;

	strcpy(name, token);

	*pname = name;
	return 0;
}