mtd: nand: Remove in vain memset() in nand_onfi_get_features()
authorRichard Weinberger <richard@nod.at>
Wed, 25 Mar 2015 13:33:09 +0000 (14:33 +0100)
committerBrian Norris <computersforpeace@gmail.com>
Thu, 7 May 2015 06:44:31 +0000 (23:44 -0700)
As all four bytes are written in any case the memset() is in vain.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/nand_base.c

index c2e1232..0afe763 100644 (file)
@@ -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);