dma-buf: heaps: Fix redundant assignment to variable ret in system_heap.c
PATCH 1/1 dma-buf: heaps: Fix redundant assignment to variable ret in system_heap.c
Colin King reported a coverity error:
The variable ret is being assigned with a value that is never read, it is being re-assigned the same value on the err0 exit path. The assignment is redundant and hence can be removed.
He had a fix, but Andrew Davis suggested a better solution (actually returning ret), so this patch implements that fix.
Cc: Colin King <[email protected]>
Cc: Sumit Semwal <[email protected]>
Cc: Benjamin Gaignard <[email protected]>
Cc: Liam Mark <[email protected]>
Cc: Laura Abbott <[email protected]>
Cc: Brian Starkey <[email protected]>
Cc: Andrew F. Davis <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Addresses-Coverity: ("Unused value")
--- drivers/dma-buf/heaps/system_heap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma-buf/heaps/system_heap.c +1 -1
@@ -98,7 +98,7 @@ static int system_heap_allocate(struct dma_heap *heap, err0:kfree (helper_buffer); -return -ENOMEM ; +return ret; }static const struct dma_heap_ops system_heap_ops = {
Signature · 1 line
2.17.1