diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2013-07-28 02:21:54 (GMT) |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-08-05 20:05:24 (GMT) |
commit | f03a5729287a8bc1eb061a2f849b5a33ed9cd3ab (patch) | |
tree | 866280fd0824feb2642169fd064f702310c17e39 /drivers/mtd/nand/nandsim.c | |
parent | 08efe91a1befa67bcc3799e0d29b7194803e1538 (diff) | |
download | linux-f03a5729287a8bc1eb061a2f849b5a33ed9cd3ab.tar.xz |
mtd: nandsim: use kasprintf()
Use kasprintf() which combines kmalloc and sprintf.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/nandsim.c')
-rw-r--r-- | drivers/mtd/nand/nandsim.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index a73dce0..ac1b46c 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c @@ -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); } /* |