From: Brian Norris Date: Tue, 25 Sep 2012 03:40:47 +0000 (-0700) Subject: mtd: nand: remove unnecessary variable X-Git-Tag: Ubuntu-snapdragon-4.4.0-1029.32~12315^2~10 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=47450b35915c45309974c74f11c2d236db1b950f;p=mirror_ubuntu-zesty-kernel.git mtd: nand: remove unnecessary variable We don't actually use the 'ret' variable; we set it, test it, and then it dies. Signed-off-by: Brian Norris Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index d06a80d4ee75..d4107848ec0a 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -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); @@ -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; }