Skip to content

Commit

Permalink
mtd: nand: remove unnecessary variable
Browse files Browse the repository at this point in the history
We don't actually use the 'ret' variable; we set it, test it, and then it dies.

Signed-off-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>
  • Loading branch information
Brian Norris authored and David Woodhouse committed Sep 29, 2012
1 parent e5570f0 commit 47450b3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2916,7 +2916,6 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
{
int i, maf_idx;
u8 id_data[8];
int ret;

/* Select the device */
chip->select_chip(mtd, 0);
Expand Down Expand Up @@ -2963,8 +2962,7 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
chip->onfi_version = 0;
if (!type->name || !type->pagesize) {
/* Check is chip is ONFI compliant */
ret = nand_flash_detect_onfi(mtd, chip, &busw);
if (ret)
if (nand_flash_detect_onfi(mtd, chip, &busw))
goto ident_done;
}

Expand Down

0 comments on commit 47450b3

Please sign in to comment.