linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] arm: dma fix returnvar.cocci warnings
@ 2021-08-20  2:15 jing yangyang
  2021-08-20  8:39 ` Russell King - ARM Linux admin
  2021-08-22  2:59 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: jing yangyang @ 2021-08-20  2:15 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Russell King, linux-omap, linux-kernel, jing yangyang, Zeal Robot

Remove unneeded variables when "0" can be returned.

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

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn>
---
 arch/arm/mach-omap2/dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
index dfc9b21..ba4a48e 100644
--- a/arch/arm/mach-omap2/dma.c
+++ b/arch/arm/mach-omap2/dma.c
@@ -79,7 +79,6 @@
 
 static unsigned configure_dma_errata(void)
 {
-	unsigned errata = 0;
 
 	/*
 	 * Errata applicable for OMAP2430ES1.0 and all omap2420
@@ -158,7 +157,7 @@ static unsigned configure_dma_errata(void)
 	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[] = {
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-22  2:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-20  2:15 [PATCH linux-next] arm: dma fix returnvar.cocci warnings jing yangyang
2021-08-20  8:39 ` Russell King - ARM Linux admin
2021-08-22  2:59 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).