From: Heinrich Schuchardt Date: Mon, 3 Aug 2020 21:09:49 +0000 (+0200) Subject: riscv: sifive: fu540: redundant initialization X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/git-logo.png?a=commitdiff_plain;h=6a43e3a16743e5fc5b765bf897691b630e3e1edb;p=u-boot.git riscv: sifive: fu540: redundant initialization We should not initialize a variable if the value is overwritten before being read. Signed-off-by: Heinrich Schuchardt Reviewed-by: Bin Meng Reviewed-by: Pragnesh Patel Tested-by: Pragnesh Patel Reviewed-by: Rick Chen --- diff --git a/arch/riscv/cpu/fu540/cache.c b/arch/riscv/cpu/fu540/cache.c index 9ee364b509..54de14238c 100644 --- a/arch/riscv/cpu/fu540/cache.c +++ b/arch/riscv/cpu/fu540/cache.c @@ -22,7 +22,7 @@ DECLARE_GLOBAL_DATA_PTR; int cache_enable_ways(void) { const void *blob = gd->fdt_blob; - int node = (-FDT_ERR_NOTFOUND); + int node; fdt_addr_t base; u32 config; u32 ways;