diff options
Diffstat (limited to 'drivers/staging/goldfish')
-rw-r--r-- | drivers/staging/goldfish/goldfish_nand.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/goldfish/goldfish_nand.c b/drivers/staging/goldfish/goldfish_nand.c index c6c85d3a31e7..d68f216a7e77 100644 --- a/drivers/staging/goldfish/goldfish_nand.c +++ b/drivers/staging/goldfish/goldfish_nand.c @@ -329,9 +329,10 @@ static int goldfish_nand_init_device(struct platform_device *pdev, mtd->priv = nand; - mtd->name = name = devm_kzalloc(&pdev->dev, name_len + 1, GFP_KERNEL); + name = devm_kzalloc(&pdev->dev, name_len + 1, GFP_KERNEL); if (name == NULL) return -ENOMEM; + mtd->name = name; result = goldfish_nand_cmd(mtd, NAND_CMD_GET_DEV_NAME, 0, name_len, name); |