提交 c0feed87 编写于 作者: F Figo.zhang 提交者: David S. Miller

tehuti: No need check vfree() pointer.

vfree() does its own 'NULL' check, so no need for check before
calling it.
Signed-off-by: NFigo.zhang <figo1802@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 50d36a93
...@@ -948,8 +948,7 @@ static void print_rxfd(struct rxf_desc *rxfd); ...@@ -948,8 +948,7 @@ static void print_rxfd(struct rxf_desc *rxfd);
static void bdx_rxdb_destroy(struct rxdb *db) static void bdx_rxdb_destroy(struct rxdb *db)
{ {
if (db) vfree(db);
vfree(db);
} }
static struct rxdb *bdx_rxdb_create(int nelem) static struct rxdb *bdx_rxdb_create(int nelem)
...@@ -1482,10 +1481,8 @@ static void bdx_tx_db_close(struct txdb *d) ...@@ -1482,10 +1481,8 @@ static void bdx_tx_db_close(struct txdb *d)
{ {
BDX_ASSERT(d == NULL); BDX_ASSERT(d == NULL);
if (d->start) { vfree(d->start);
vfree(d->start); d->start = NULL;
d->start = NULL;
}
} }
/************************************************************************* /*************************************************************************
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册