From 4fefbc020aa3239b3fe030662e54d5a96d4b7e16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gl=C3=B6ckner?= Date: Wed, 24 Apr 2013 14:02:30 +0200 Subject: colibri_t20: nand: fix compat string length MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There was no space for the null byte. In our case it led to the lowest byte of the pointer mtd used by nand_init_chip being cleared, which made the system crash when it tried to call mtd->priv->select_chip. Signed-off-by: Daniel Glöckner --- board/toradex/common/tegra2_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/toradex/common/tegra2_nand.c b/board/toradex/common/tegra2_nand.c index 1c39f655bd..cc8e324b1f 100644 --- a/board/toradex/common/tegra2_nand.c +++ b/board/toradex/common/tegra2_nand.c @@ -920,7 +920,7 @@ int board_nand_init(struct nand_chip *nand) struct fdt_nand *config = &info->config; struct mtd_info tmp_mtd; int tmp_manf, tmp_id, tmp_4th; - char compat[8]; + char compat[9]; int node; #ifndef CONFIG_COLIBRI_T30 -- cgit v1.2.3