android_kernel_samsung_a7y1.../drivers/scsi/qla4xxx
Arnd Bergmann f41b740194 scsi: qla4xxx: avoid freeing unallocated dma memory
[ Upstream commit 608f729c31d4caf52216ea00d20092a80959256d ]

Clang -Wuninitialized notices that on is_qla40XX we never allocate any DMA
memory in get_fw_boot_info() but attempt to free it anyway:

drivers/scsi/qla4xxx/ql4_os.c:5915:7: error: variable 'buf_dma' is used uninitialized whenever 'if' condition is false
      [-Werror,-Wsometimes-uninitialized]
                if (!(val & 0x07)) {
                    ^~~~~~~~~~~~~
drivers/scsi/qla4xxx/ql4_os.c:5985:47: note: uninitialized use occurs here
        dma_free_coherent(&ha->pdev->dev, size, buf, buf_dma);
                                                     ^~~~~~~
drivers/scsi/qla4xxx/ql4_os.c:5915:3: note: remove the 'if' if its condition is always true
                if (!(val & 0x07)) {
                ^~~~~~~~~~~~~~~~~~~
drivers/scsi/qla4xxx/ql4_os.c:5885:20: note: initialize the variable 'buf_dma' to silence this warning
        dma_addr_t buf_dma;
                          ^
                           = 0

Skip the call to dma_free_coherent() here.

Fixes: 2a991c215978 ("[SCSI] qla4xxx: Boot from SAN support for open-iscsi")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-06 18:20:19 +02:00
..
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_83xx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_83xx.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_attr.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_bsg.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_bsg.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_dbg.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_dbg.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_def.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_fw.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_glbl.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_init.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_inline.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_iocb.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_isr.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_mbx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_nvram.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_nvram.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_nx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_nx.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ql4_os.c scsi: qla4xxx: avoid freeing unallocated dma memory 2020-04-06 18:20:19 +02:00
ql4_version.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30