From: Colin Ian King Date: Tue, 21 Dec 2021 18:13:40 +0000 (+0000) Subject: mtd: rawnand: omap_elm: remove redundant variable 'errors' X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2212c19e51969213924ab538396b6c1e072c41f1;p=linux.git mtd: rawnand: omap_elm: remove redundant variable 'errors' The variable 'errors' is being used to sum the number of errors but it is never used afterwards. This can be considered a redundant set of operations and can be removed. Signed-off-by: Colin Ian King Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20211221181340.524639-1-colin.i.king@gmail.com --- diff --git a/drivers/mtd/nand/raw/omap_elm.c b/drivers/mtd/nand/raw/omap_elm.c index db105d9b560c5..893e9979c4a25 100644 --- a/drivers/mtd/nand/raw/omap_elm.c +++ b/drivers/mtd/nand/raw/omap_elm.c @@ -282,7 +282,7 @@ static void elm_start_processing(struct elm_info *info, static void elm_error_correction(struct elm_info *info, struct elm_errorvec *err_vec) { - int i, j, errors = 0; + int i, j; int offset; u32 reg_val; @@ -312,8 +312,6 @@ static void elm_error_correction(struct elm_info *info, /* Update error location register */ offset += 4; } - - errors += err_vec[i].error_count; } else { err_vec[i].error_uncorrectable = true; }