From: Richard Weinberger Date: Wed, 25 Mar 2015 13:33:09 +0000 (+0100) Subject: mtd: nand: Remove in vain memset() in nand_onfi_get_features() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0aec7ac997b784dfc83125cd120d2bd5d3851eb6;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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: Richard Weinberger Signed-off-by: Brian Norris --- diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index c2e1232cd45c..0afe76315c38 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -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);