[PATCH] ARM: dove: fix returnvar.cocci warnings

From: kernel test robot
Date: Mon May 02 2022 - 22:46:20 EST


From: kernel test robot <lkp@xxxxxxxxx>

arch/arm/mach-omap2/dma.c:82:10-16: Unneeded variable: "errata". Return "0" on line 161


Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: kernel test robot <lkp@xxxxxxxxx>
---

tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 9f9b9a2972eb8dcaad09d826c5c6d7488eaca3e6
commit: 09f6b27d5ddd9ad0ec096d1b0f8decdacc70f0f8 [1066/8035] ARM: dove: multiplatform support
:::::: branch date: 15 hours ago
:::::: commit date: 4 weeks ago

arch/arm/mach-omap2/dma.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

--- a/arch/arm/mach-omap2/dma.c
+++ b/arch/arm/mach-omap2/dma.c
@@ -79,8 +79,6 @@ static const struct omap_dma_reg reg_map

static unsigned configure_dma_errata(void)
{
- unsigned errata = 0;
-
/*
* Errata applicable for OMAP2430ES1.0 and all omap2420
*
@@ -158,7 +156,7 @@ static unsigned configure_dma_errata(voi
if (cpu_is_omap34xx() && (omap_type() != OMAP2_DEVICE_TYPE_GP))
SET_DMA_ERRATA(DMA_ROMCODE_BUG);

- return errata;
+ return 0;
}

static const struct dma_slave_map omap24xx_sdma_dt_map[] = {