aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nand_base.c
diff options
context:
space:
mode:
authorCai Zhiyong <caizhiyong@huawei.com>2013-12-25 08:19:21 -0500
committerBrian Norris <computersforpeace@gmail.com>2014-01-11 15:07:18 -0500
commit092b6a1dd0c82013f59c717b8f2ca057863183e3 (patch)
tree993d51f0e3bdd1c8dd4ab014626c0fb7f28f0486 /drivers/mtd/nand/nand_base.c
parent3e77216c2acf063d4233c73fb3edc189142ae439 (diff)
mtd: nand: assign mtd->name in find_full_id_nand
This patch assigned the type->name to mtd->name when mtd->name is NULL in function "find_full_id_nand". mtd->name is NULL may cause some problem. Signed-off-by: Cai Zhiyong <caizhiyong@huawei.com> Acked-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
-rw-r--r--drivers/mtd/nand/nand_base.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 9b3bb3c519e9..404e83d7e3da 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3327,6 +3327,9 @@ static bool find_full_id_nand(struct mtd_info *mtd, struct nand_chip *chip,
3327 3327
3328 *busw = type->options & NAND_BUSWIDTH_16; 3328 *busw = type->options & NAND_BUSWIDTH_16;
3329 3329
3330 if (!mtd->name)
3331 mtd->name = type->name;
3332
3330 return true; 3333 return true;
3331 } 3334 }
3332 return false; 3335 return false;