mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 00:48:50 +00:00
608f729c31
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:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
ql4_83xx.c | ||
ql4_83xx.h | ||
ql4_attr.c | ||
ql4_bsg.c | ||
ql4_bsg.h | ||
ql4_dbg.c | ||
ql4_dbg.h | ||
ql4_def.h | ||
ql4_fw.h | ||
ql4_glbl.h | ||
ql4_init.c | ||
ql4_inline.h | ||
ql4_iocb.c | ||
ql4_isr.c | ||
ql4_mbx.c | ||
ql4_nvram.c | ||
ql4_nvram.h | ||
ql4_nx.c | ||
ql4_nx.h | ||
ql4_os.c | ||
ql4_version.h |