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

Miquel Raynal miquel.raynal at bootlin.com
Mon May 10 03:43:40 PDT 2021


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 at linux.alibaba.com>
> Signed-off-by: Yang Li <yang.lee at linux.alibaba.com>

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

Miquel



More information about the linux-mtd mailing list