mirror of https://gitee.com/openkylin/linux.git
liquidio: fix Coverity scan errors
Fix Coverity scan errors by not dereferencing lio->glists_dma_base pointer if it's NULL. See http://marc.info/?l=linux-netdev&m=149002294305614&w=2 Reported-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Felix Manlunas <felix.manlunas@cavium.com> Signed-off-by: VSR Burru <veerasenareddy.burru@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
cfc62d878f
commit
58ad319834
|
@ -712,7 +712,8 @@ static void delete_glists(struct lio *lio)
|
|||
kfree(g);
|
||||
} while (g);
|
||||
|
||||
if (lio->glists_virt_base && lio->glists_virt_base[i]) {
|
||||
if (lio->glists_virt_base && lio->glists_virt_base[i] &&
|
||||
lio->glists_dma_base && lio->glists_dma_base[i]) {
|
||||
lio_dma_free(lio->oct_dev,
|
||||
lio->glist_entry_size * lio->tx_qsize,
|
||||
lio->glists_virt_base[i],
|
||||
|
|
|
@ -470,7 +470,8 @@ static void delete_glists(struct lio *lio)
|
|||
kfree(g);
|
||||
} while (g);
|
||||
|
||||
if (lio->glists_virt_base && lio->glists_virt_base[i]) {
|
||||
if (lio->glists_virt_base && lio->glists_virt_base[i] &&
|
||||
lio->glists_dma_base && lio->glists_dma_base[i]) {
|
||||
lio_dma_free(lio->oct_dev,
|
||||
lio->glist_entry_size * lio->tx_qsize,
|
||||
lio->glists_virt_base[i],
|
||||
|
|
Loading…
Reference in New Issue