diff options
author | Figo.zhang <figo1802@gmail.com> | 2009-06-10 06:18:38 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-11 11:47:14 +0200 |
commit | c0feed87fe452c20681ae29909adaecedd1ec9f3 (patch) | |
tree | 29e99cd46d95e9a123c144fdb0b56c7fd168966f /drivers/net/tehuti.c | |
parent | vxge: No need for check vfree() pointer. (diff) | |
download | linux-c0feed87fe452c20681ae29909adaecedd1ec9f3.tar.xz linux-c0feed87fe452c20681ae29909adaecedd1ec9f3.zip |
tehuti: No need check vfree() pointer.
vfree() does its own 'NULL' check, so no need for check before
calling it.
Signed-off-by: Figo.zhang <figo1802@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tehuti.c')
-rw-r--r-- | drivers/net/tehuti.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c index 093807a182f2..3c2679cd196b 100644 --- a/drivers/net/tehuti.c +++ b/drivers/net/tehuti.c @@ -948,8 +948,7 @@ static void print_rxfd(struct rxf_desc *rxfd); static void bdx_rxdb_destroy(struct rxdb *db) { - if (db) - vfree(db); + vfree(db); } static struct rxdb *bdx_rxdb_create(int nelem) @@ -1482,10 +1481,8 @@ static void bdx_tx_db_close(struct txdb *d) { BDX_ASSERT(d == NULL); - if (d->start) { - vfree(d->start); - d->start = NULL; - } + vfree(d->start); + d->start = NULL; } /************************************************************************* |