Commit 0aec7ac9 authored by Richard Weinberger's avatar Richard Weinberger Committed by Brian Norris

mtd: nand: Remove in vain memset() in nand_onfi_get_features()

As all four bytes are written in any case the memset() is in vain.
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 66610443
...@@ -2928,9 +2928,6 @@ static int nand_onfi_get_features(struct mtd_info *mtd, struct nand_chip *chip, ...@@ -2928,9 +2928,6 @@ static int nand_onfi_get_features(struct mtd_info *mtd, struct nand_chip *chip,
& ONFI_OPT_CMD_SET_GET_FEATURES)) & ONFI_OPT_CMD_SET_GET_FEATURES))
return -EINVAL; return -EINVAL;
/* clear the sub feature parameters */
memset(subfeature_param, 0, ONFI_SUBFEATURE_PARAM_LEN);
chip->cmdfunc(mtd, NAND_CMD_GET_FEATURES, addr, -1); chip->cmdfunc(mtd, NAND_CMD_GET_FEATURES, addr, -1);
for (i = 0; i < ONFI_SUBFEATURE_PARAM_LEN; ++i) for (i = 0; i < ONFI_SUBFEATURE_PARAM_LEN; ++i)
*subfeature_param++ = chip->read_byte(mtd); *subfeature_param++ = chip->read_byte(mtd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment