Skip to content

Commit

Permalink
mtd: nand: Remove in vain memset() in nand_onfi_get_features()
Browse files Browse the repository at this point in the history
As all four bytes are written in any case the memset() is in vain.

Signed-off-by: Richard Weinberger <[email protected]>
Signed-off-by: Brian Norris <[email protected]>
  • Loading branch information
richardweinberger authored and computersforpeace committed May 7, 2015
1 parent 6661044 commit 0aec7ac
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2928,9 +2928,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);
Expand Down

0 comments on commit 0aec7ac

Please sign in to comment.