提交 b14bec89 编写于 作者: G Gustavo A. R. Silva 提交者: David S. Miller

liquidio: remove unnecessary NULL check before kfree in delete_glists

NULL check before freeing functions like kfree is not needed.

This issue was detected with the help of Coccinelle.
Signed-off-by: NGustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: NFelix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ac79a512
...@@ -435,8 +435,7 @@ static void delete_glists(struct lio *lio) ...@@ -435,8 +435,7 @@ static void delete_glists(struct lio *lio)
do { do {
g = (struct octnic_gather *) g = (struct octnic_gather *)
list_delete_head(&lio->glist[i]); list_delete_head(&lio->glist[i]);
if (g) kfree(g);
kfree(g);
} while (g); } while (g);
if (lio->glists_virt_base && lio->glists_virt_base[i] && if (lio->glists_virt_base && lio->glists_virt_base[i] &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册