mtd: nand_base: Removed unnecessary cleaning "onfi_version" variable
authorAlexander Shiyan <shc_work@mail.ru>
Thu, 28 Feb 2013 08:02:20 +0000 (12:02 +0400)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 5 Apr 2013 11:56:53 +0000 (12:56 +0100)
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>
drivers/mtd/nand/nand_base.c

index ad0a88f13794dffe18de1006939f38311f4043f7..f159d5f184bfbd9424f03ce49e178f91333f54b8 100644 (file)
@@ -2823,8 +2823,6 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,
                chip->onfi_version = 20;
        else if (val & (1 << 1))
                chip->onfi_version = 10;
-       else
-               chip->onfi_version = 0;
 
        if (!chip->onfi_version) {
                pr_info("%s: unsupported ONFI version: %d\n", __func__, val);