All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sound/soc/samsung: remove unneeded ret variable
@ 2022-01-17 11:03 ` cgel.zte
  0 siblings, 0 replies; 8+ messages in thread
From: cgel.zte @ 2022-01-17 11:03 UTC (permalink / raw)
  To: krzysztof.kozlowski
  Cc: s.nawrocki, lgirdwood, broonie, perex, tiwai, alsa-devel,
	linux-kernel, Minghao Chi, Zeal Robot, CGEL ZTE

From: Minghao Chi <chi.minghao@zte.com.cn>

Return value from io_remap_pfn_range() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
---
 sound/soc/samsung/idma.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c
index c3f1b054e238..402ccadad46c 100644
--- a/sound/soc/samsung/idma.c
+++ b/sound/soc/samsung/idma.c
@@ -244,17 +244,14 @@ static int idma_mmap(struct snd_soc_component *component,
 {
 	struct snd_pcm_runtime *runtime = substream->runtime;
 	unsigned long size, offset;
-	int ret;
 
 	/* From snd_pcm_lib_mmap_iomem */
 	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
 	size = vma->vm_end - vma->vm_start;
 	offset = vma->vm_pgoff << PAGE_SHIFT;
-	ret = io_remap_pfn_range(vma, vma->vm_start,
+	return io_remap_pfn_range(vma, vma->vm_start,
 			(runtime->dma_addr + offset) >> PAGE_SHIFT,
 			size, vma->vm_page_prot);
-
-	return ret;
 }
 
 static irqreturn_t iis_irq(int irqno, void *dev_id)
-- 
2.25.1


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

end of thread, other threads:[~2022-01-25 10:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-17 11:03 [PATCH] sound/soc/samsung: remove unneeded ret variable cgel.zte
2022-01-17 11:03 ` cgel.zte
2022-01-17 11:46 ` Krzysztof Kozlowski
2022-01-17 11:46   ` Krzysztof Kozlowski
2022-01-18 17:24 ` Mark Brown
2022-01-18 17:24   ` Mark Brown
2022-01-25 10:20 ` Mark Brown
2022-01-25 10:20   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.