Skip to contentSkip to conversation

dma-buf: heaps: fix returnvar.cocci warnings

PATCH In review Julia Lawall 2 participants 2 messages Sep 26, 2020 – Sep 29, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dma-buf: heaps: fix returnvar.cocci warnings

From: kernel test robot <[email protected]>

Remove unneeded variable used to store return value.

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

---

url:    https://github.com/0day-ci/linux/commits/John-Stultz/dma-buf-Performance-improvements-for-system-heap/20200926-122541
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git bcf876870b95592b52519ed4aafcf9d95999bc9c

:::::: branch date: 6 hours ago
:::::: commit date: 6 hours ago

Minor issue...

 cma_heap.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dma-buf/heaps/cma_heap.c +1 -2
@@ -116,7 +116,6 @@ static int cma_heap_dma_buf_begin_cpu_ac
 {
 	struct cma_heap_buffer *buffer = dmabuf->priv;
 	struct dma_heap_attachment *a;
-	int ret = 0;
 
 	if (buffer->vmap_cnt)
 		invalidate_kernel_vmap_range(buffer->vaddr, buffer->len);
@@ -128,7 +127,7 @@ static int cma_heap_dma_buf_begin_cpu_ac
 	}
 	mutex_unlock(&buffer->lock);
 
-	return ret;
+	return 0;
 }
 
 static int cma_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf,