diff options
author | vibi sreenivasan <vibisreenivasan@linuxmail.org> | 2014-08-12 14:39:27 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-08-16 12:23:27 -0700 |
commit | 72267c27fd5780e70d6ec4e920f8e3e27cafcbb7 (patch) | |
tree | 353820106dddc661389e48b16a421c222fb6cd50 /drivers/staging | |
parent | f01620914699679a26212affa358e5bbc5ede63e (diff) | |
download | linux-72267c27fd5780e70d6ec4e920f8e3e27cafcbb7.tar.bz2 |
staging/mt29f_spinand: coding style fixes
This patch fixes the coding style error :
"WARNING: else is not generally useful after a break or return"
reported by checkpatch.pl
Signed-off-by: Vibi Sreenivasan <vibisreenivasan@linuxmail.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/mt29f_spinand/mt29f_spinand.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/staging/mt29f_spinand/mt29f_spinand.c b/drivers/staging/mt29f_spinand/mt29f_spinand.c index 3464e0c521e6..3628bcb840c3 100644 --- a/drivers/staging/mt29f_spinand/mt29f_spinand.c +++ b/drivers/staging/mt29f_spinand/mt29f_spinand.c @@ -252,15 +252,13 @@ static int spinand_enable_ecc(struct spi_device *spi_nand) if (retval < 0) return retval; - if ((otp & OTP_ECC_MASK) == OTP_ECC_MASK) { + if ((otp & OTP_ECC_MASK) == OTP_ECC_MASK) return 0; - } else { - otp |= OTP_ECC_MASK; - retval = spinand_set_otp(spi_nand, &otp); - if (retval < 0) - return retval; - return spinand_get_otp(spi_nand, &otp); - } + otp |= OTP_ECC_MASK; + retval = spinand_set_otp(spi_nand, &otp); + if (retval < 0) + return retval; + return spinand_get_otp(spi_nand, &otp); } #endif @@ -279,8 +277,8 @@ static int spinand_disable_ecc(struct spi_device *spi_nand) if (retval < 0) return retval; return spinand_get_otp(spi_nand, &otp); - } else - return 0; + } + return 0; } /** @@ -529,8 +527,8 @@ static int spinand_program_page(struct spi_device *spi_nand, dev_err(&spi_nand->dev, "program error, page %d\n", page_id); return -1; - } else - break; + } + break; } } #ifdef CONFIG_MTD_SPINAND_ONDIEECC @@ -605,8 +603,8 @@ static int spinand_erase_block(struct spi_device *spi_nand, u16 block_id) dev_err(&spi_nand->dev, "erase error, block %d\n", block_id); return -1; - } else - break; + } + break; } } return 0; |