Skip to content

Commit 2212c19

Browse files
ColinIanKingmiquelraynal
authored andcommitted
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 <[email protected]> Signed-off-by: Miquel Raynal <[email protected]> Link: https://lore.kernel.org/linux-mtd/[email protected]
1 parent ac178a2 commit 2212c19

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/mtd/nand/raw/omap_elm.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ static void elm_start_processing(struct elm_info *info,
282282
static void elm_error_correction(struct elm_info *info,
283283
struct elm_errorvec *err_vec)
284284
{
285-
int i, j, errors = 0;
285+
int i, j;
286286
int offset;
287287
u32 reg_val;
288288

@@ -312,8 +312,6 @@ static void elm_error_correction(struct elm_info *info,
312312
/* Update error location register */
313313
offset += 4;
314314
}
315-
316-
errors += err_vec[i].error_count;
317315
} else {
318316
err_vec[i].error_uncorrectable = true;
319317
}

0 commit comments

Comments
 (0)