Skip to content

Commit

Permalink
ASoC: samsung: remove unneeded ret variable
Browse files Browse the repository at this point in the history
Return value from io_remap_pfn_range() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Minghao Chi <[email protected]>
Signed-off-by: CGEL ZTE <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
Minghao Chi authored and broonie committed Jan 24, 2022
1 parent 4ec19de commit de53190
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sound/soc/samsung/idma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit de53190

Please sign in to comment.