summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang Li <yang.lee@linux.alibaba.com>2021-04-28 12:02:22 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2021-05-10 12:48:35 +0200
commit063deb31ae902b510e57af17a45151baf5057a61 (patch)
treec6bf269b686db9f21ca934204fa5b3d3de0e1cca
parentmtd: *nftl: return -ENOMEM when kmalloc failed (diff)
downloadlinux-063deb31ae902b510e57af17a45151baf5057a61.tar.xz
linux-063deb31ae902b510e57af17a45151baf5057a61.zip
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
-rw-r--r--drivers/mtd/tests/torturetest.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/mtd/tests/torturetest.c b/drivers/mtd/tests/torturetest.c
index 6787ac5471a9..841689b4d86d 100644
--- a/drivers/mtd/tests/torturetest.c
+++ b/drivers/mtd/tests/torturetest.c
@@ -230,8 +230,6 @@ static int __init tort_init(void)
if (!bad_ebs)
goto out_check_buf;
- err = 0;
-
/* Initialize patterns */
memset(patt_FF, 0xFF, mtd->erasesize);
for (i = 0; i < mtd->erasesize / pgsize; i++) {