diff options
author | Nathan Chancellor <natechancellor@gmail.com> | 2019-03-07 16:18:39 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-03-25 22:22:44 -0400 |
commit | 3e14592da654d53d87987aa09753d5a26e45446f (patch) | |
tree | 19d5ee3783895d6c73c66270950e84ba1824d935 /drivers/target | |
parent | a4b207dea9783bbf60af03d6f2c8080b0cee0543 (diff) | |
download | linux-3e14592da654d53d87987aa09753d5a26e45446f.tar.bz2 |
scsi: gdth: Only call dma_free_coherent when buf is not NULL in ioc_general
When building with -Wsometimes-uninitialized, Clang warns:
drivers/scsi/gdth.c:3662:6: warning: variable 'paddr' is used
uninitialized whenever 'if' condition is false
[-Wsometimes-uninitialized]
Don't attempt to call dma_free_coherent when buf is NULL (meaning that
we never called dma_alloc_coherent and initialized paddr), which avoids
this warning.
Link: https://github.com/ClangBuiltLinux/linux/issues/402
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target')
0 files changed, 0 insertions, 0 deletions