Skip to content

Commit

Permalink
mtd: rawnand: omap_elm: remove redundant variable 'errors'
Browse files Browse the repository at this point in the history
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 <colin.i.king@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20211221181340.524639-1-colin.i.king@gmail.com
  • Loading branch information
Colin Ian King authored and Miquel Raynal committed Jan 23, 2022
1 parent ac178a2 commit 2212c19
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mtd/nand/raw/omap_elm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 2212c19

Please sign in to comment.