Skip to contentSkip to conversation

dma-buf: system_heap: 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: system_heap: 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: 4 hours ago
:::::: commit date: 4 hours ago

Please take the patch only if it's a positive warning. Thanks!

 system_heap.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dma-buf/heaps/system_heap.c +1 -2
@@ -133,7 +133,6 @@ static int system_heap_dma_buf_begin_cpu
 {
 	struct system_heap_buffer *buffer = dmabuf->priv;
 	struct dma_heap_attachment *a;
-	int ret = 0;
 
 	mutex_lock(&buffer->lock);
 
@@ -146,7 +145,7 @@ static int system_heap_dma_buf_begin_cpu
 	}
 	mutex_unlock(&buffer->lock);
 
-	return ret;
+	return 0;
 }
 
 static int system_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf,