Skip to content

Commit

Permalink
mtd: mtdswap: Remove redundant assignment of pointer eb
Browse files Browse the repository at this point in the history
The pointer eb is being assigned a value that is never read, it is
being updated later on. The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210910120023.46308-1-colin.king@canonical.com
  • Loading branch information
Colin Ian King authored and Miquel Raynal committed Sep 14, 2021
1 parent 6880fa6 commit b72841e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/mtd/mtdswap.c
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,6 @@ static int mtdswap_move_block(struct mtdswap_dev *d, unsigned int oldblock,
return ret;
}

eb = d->eb_data + *newblock / d->pages_per_eblk;
d->page_data[page] = *newblock;
d->revmap[oldblock] = PAGE_UNDEF;
eb = d->eb_data + oldblock / d->pages_per_eblk;
Expand Down

0 comments on commit b72841e

Please sign in to comment.