diff options
author | Cai Zhiyong <caizhiyong@huawei.com> | 2013-12-25 17:19:21 +0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-01-12 00:07:18 +0400 |
commit | 092b6a1dd0c82013f59c717b8f2ca057863183e3 (patch) | |
tree | 993d51f0e3bdd1c8dd4ab014626c0fb7f28f0486 /drivers/mtd/nand/nand_base.c | |
parent | 3e77216c2acf063d4233c73fb3edc189142ae439 (diff) | |
download | linux-092b6a1dd0c82013f59c717b8f2ca057863183e3.tar.xz |
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.c | 3 |
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, *busw = type->options & NAND_BUSWIDTH_16; + if (!mtd->name) + mtd->name = type->name; + return true; } return false; |