Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: tests: Remove redundant assignment to err

Variable 'err' is set to 0 but this value is never read as it is
overwritten with a new value later on, hence it is a redundant
assignment and can be removed.

Cleans up the following clang-analyzer warning:

drivers/mtd/tests/torturetest.c:233:2: warning: Value stored to 'err' is
never read [clang-analyzer-deadcode.DeadStores]

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/1619604142-119891-1-git-send-email-yang.lee@linux.alibaba.com

authored by

Yang Li and committed by
Miquel Raynal
063deb31 9c5b19c2

-2
-2
drivers/mtd/tests/torturetest.c
··· 230 230 if (!bad_ebs) 231 231 goto out_check_buf; 232 232 233 - err = 0; 234 - 235 233 /* Initialize patterns */ 236 234 memset(patt_FF, 0xFF, mtd->erasesize); 237 235 for (i = 0; i < mtd->erasesize / pgsize; i++) {