提交 58ad3198 编写于 作者: F Felix Manlunas 提交者: 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: NStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: NFelix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: NVSR Burru <veerasenareddy.burru@cavium.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册