[PATCH] mtd: nand: Remove in vain memset() in nand_onfi_get_features()

Richard Weinberger richard at nod.at
Wed Mar 25 06:33:09 PDT 2015


As all four bytes are written in any case the memset() is in vain.

Signed-off-by: Richard Weinberger <richard at nod.at>
---
 drivers/mtd/nand/nand_base.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index df7eb4f..030a043 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2909,9 +2909,6 @@ static int nand_onfi_get_features(struct mtd_info *mtd, struct nand_chip *chip,
 	      & ONFI_OPT_CMD_SET_GET_FEATURES))
 		return -EINVAL;
 
-	/* clear the sub feature parameters */
-	memset(subfeature_param, 0, ONFI_SUBFEATURE_PARAM_LEN);
-
 	chip->cmdfunc(mtd, NAND_CMD_GET_FEATURES, addr, -1);
 	for (i = 0; i < ONFI_SUBFEATURE_PARAM_LEN; ++i)
 		*subfeature_param++ = chip->read_byte(mtd);
-- 
1.8.4.5




More information about the linux-mtd mailing list