Commit f03a5729 authored by Akinobu Mita's avatar Akinobu Mita Committed by David Woodhouse

mtd: nandsim: use kasprintf()

Use kasprintf() which combines kmalloc and sprintf.
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 08efe91a
......@@ -654,9 +654,7 @@ static void free_device(struct nandsim *ns)
static char *get_partition_name(int i)
{
char buf[64];
sprintf(buf, "NAND simulator partition %d", i);
return kstrdup(buf, GFP_KERNEL);
return kasprintf(GFP_KERNEL, "NAND simulator partition %d", i);
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment