From: Andrew Goodbody Date: Tue, 12 Aug 2025 16:29:07 +0000 (+0100) Subject: spi: npcm-fiu: Remove repeated test X-Git-Tag: v2026.01-rc2~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a6411daed49300a4182a0494d5a5a3b9f446429;p=thirdparty%2Fu-boot.git spi: npcm-fiu: Remove repeated test In npcm_fiu_uma_operation to enter a code block nbytes must be non-zero. So testing for nbytes inside the code block is redundant and can be removed. This issue was found by Smatch. Signed-off-by: Andrew Goodbody --- diff --git a/drivers/spi/npcm_fiu_spi.c b/drivers/spi/npcm_fiu_spi.c index 7b8271c8bbc..761ef8c058b 100644 --- a/drivers/spi/npcm_fiu_spi.c +++ b/drivers/spi/npcm_fiu_spi.c @@ -273,8 +273,7 @@ static int npcm_fiu_uma_operation(struct npcm_fiu_priv *priv, const struct spi_m if (op->data.dir == SPI_MEM_DATA_OUT && nbytes) { memcpy(data_reg, tx, nbytes); - if (nbytes) - writel(data_reg[0], ®s->uma_dw0); + writel(data_reg[0], ®s->uma_dw0); if (nbytes > DW_SIZE) writel(data_reg[1], ®s->uma_dw1); if (nbytes > DW_SIZE * 2)