Commit 58ad3198 authored by Felix Manlunas's avatar Felix Manlunas Committed by David S. Miller

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=2Reported-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarFelix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: default avatarVSR Burru <veerasenareddy.burru@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cfc62d87
......@@ -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],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment