diff options
author | Nathan Chancellor <nathan@kernel.org> | 2022-05-05 08:27:38 -0700 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2022-05-14 15:41:16 +0200 |
commit | 6977262c2eee111645668fe9e235ef2f5694abf7 (patch) | |
tree | c7fe498b3d6b10c0b80c72bdbacf3b397051bd91 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | a181b8d187319bf265a2019ddde856a3d2f107a6 (diff) |
i2c: at91: Initialize dma_buf in at91_twi_xfer()
Clang warns:
drivers/i2c/busses/i2c-at91-master.c:707:6: warning: variable 'dma_buf' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (dev->use_dma) {
^~~~~~~~~~~~
drivers/i2c/busses/i2c-at91-master.c:717:27: note: uninitialized use occurs here
i2c_put_dma_safe_msg_buf(dma_buf, m_start, !ret);
^~~~~~~
Initialize dma_buf to NULL, as i2c_put_dma_safe_msg_buf() is a no-op
when the first argument is NULL, which will work for the !dev->use_dma
case.
Fixes: 03fbb903c8bf ("i2c: at91: use dma safe buffers")
Link: https://github.com/ClangBuiltLinux/linux/issues/1629
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Michael Walle <michael@walle.cc>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions