Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72267c27 authored by vibi sreenivasan's avatar vibi sreenivasan Committed by Greg Kroah-Hartman
Browse files

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: default avatarVibi Sreenivasan <vibisreenivasan@linuxmail.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f0162091
Loading
Loading
Loading
Loading
+12 −14
Original line number Original line Diff line number Diff line
@@ -252,16 +252,14 @@ static int spinand_enable_ecc(struct spi_device *spi_nand)
	if (retval < 0)
	if (retval < 0)
		return retval;
		return retval;


	if ((otp & OTP_ECC_MASK) == OTP_ECC_MASK) {
	if ((otp & OTP_ECC_MASK) == OTP_ECC_MASK)
		return 0;
		return 0;
	} else {
	otp |= OTP_ECC_MASK;
	otp |= OTP_ECC_MASK;
	retval = spinand_set_otp(spi_nand, &otp);
	retval = spinand_set_otp(spi_nand, &otp);
	if (retval < 0)
	if (retval < 0)
		return retval;
		return retval;
	return spinand_get_otp(spi_nand, &otp);
	return spinand_get_otp(spi_nand, &otp);
}
}
}
#endif
#endif


static int spinand_disable_ecc(struct spi_device *spi_nand)
static int spinand_disable_ecc(struct spi_device *spi_nand)
@@ -279,7 +277,7 @@ static int spinand_disable_ecc(struct spi_device *spi_nand)
		if (retval < 0)
		if (retval < 0)
			return retval;
			return retval;
		return spinand_get_otp(spi_nand, &otp);
		return spinand_get_otp(spi_nand, &otp);
	} else
	}
	return 0;
	return 0;
}
}


@@ -529,7 +527,7 @@ static int spinand_program_page(struct spi_device *spi_nand,
				dev_err(&spi_nand->dev,
				dev_err(&spi_nand->dev,
					"program error, page %d\n", page_id);
					"program error, page %d\n", page_id);
				return -1;
				return -1;
			} else
			}
			break;
			break;
		}
		}
	}
	}
@@ -605,7 +603,7 @@ static int spinand_erase_block(struct spi_device *spi_nand, u16 block_id)
				dev_err(&spi_nand->dev,
				dev_err(&spi_nand->dev,
					"erase error, block %d\n", block_id);
					"erase error, block %d\n", block_id);
				return -1;
				return -1;
			} else
			}
			break;
			break;
		}
		}
	}
	}