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 <[email protected]>
Acked-by: Huang Shijie <[email protected]>
Signed-off-by: Brian Norris <[email protected]>
This commit is contained in:
Cai Zhiyong 2013-12-25 21:19:21 +08:00 • committed by Brian Norris
commit 092b6a1dd0

View file

@ -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;