Re: [PATCH] mtd: tests: Remove redundant assignment to err

From: Miquel Raynal
Date: Mon May 10 2021 - 06:57:04 EST


On Wed, 2021-04-28 at 10:02:22 UTC, Yang Li wrote:
> 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@xxxxxxxxxxxxxxxxx>
> Signed-off-by: Yang Li <yang.lee@xxxxxxxxxxxxxxxxx>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.

Miquel