Skip to content

Commit 0cca9fb

Browse files
shcgitDavid Woodhouse
authored andcommitted
mtd: nand_base: Removed unnecessary cleaning "onfi_version" variable
Variable "onfi_version" is already set to zero before nand_flash_detect_onfi() call, so additional cleaning is not necessary. Signed-off-by: Alexander Shiyan <shc_work@mail.ru> Acked-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
1 parent fb066ad commit 0cca9fb

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

‎drivers/mtd/nand/nand_base.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2823,8 +2823,6 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
28232823
chip->onfi_version = 20;
28242824
else if (val & (1 << 1))
28252825
chip->onfi_version = 10;
2826-
else
2827-
chip->onfi_version = 0;
28282826

28292827
if (!chip->onfi_version) {
28302828
pr_info("%s: unsupported ONFI version: %d\n", __func__, val);

0 commit comments

Comments
 (0)