forked from Minki/linux
55d5e4f98f
The new driver incorrectly unwinds after errors, as clang points out:
drivers/dma-buf/st-dma-resv.c:295:7: error: variable 'i' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
if (r) {
^
drivers/dma-buf/st-dma-resv.c:336:9: note: uninitialized use occurs here
while (i--)
^
drivers/dma-buf/st-dma-resv.c:295:3: note: remove the 'if' if its condition is always false
if (r) {
^~~~~~~~
drivers/dma-buf/st-dma-resv.c:288:6: error: variable 'i' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
if (r) {
^
drivers/dma-buf/st-dma-resv.c:336:9: note: uninitialized use occurs here
while (i--)
^
drivers/dma-buf/st-dma-resv.c:288:2: note: remove the 'if' if its condition is always false
if (r) {
^~~~~~~~
drivers/dma-buf/st-dma-resv.c:280:10: note: initialize the variable 'i' to silence this warning
int r, i;
^
= 0
Skip cleaning up the bits that have not been allocated at this point.
Fixes:
|
||
---|---|---|
.. | ||
heaps | ||
dma-buf-sysfs-stats.c | ||
dma-buf-sysfs-stats.h | ||
dma-buf.c | ||
dma-fence-array.c | ||
dma-fence-chain.c | ||
dma-fence.c | ||
dma-heap.c | ||
dma-resv.c | ||
Kconfig | ||
Makefile | ||
selftest.c | ||
selftest.h | ||
selftests.h | ||
st-dma-fence-chain.c | ||
st-dma-fence.c | ||
st-dma-resv.c | ||
sw_sync.c | ||
sync_debug.c | ||
sync_debug.h | ||
sync_file.c | ||
sync_trace.h | ||
udmabuf.c |