tehuti: No need check vfree() pointer.
authorFigo.zhang <figo1802@gmail.com>
Wed, 10 Jun 2009 04:18:38 +0000 (04:18 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Jun 2009 09:47:14 +0000 (02:47 -0700)
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>
drivers/net/tehuti.c

index 093807a182f2b100c6a9028fa2aedd859151eb39..3c2679cd196bdd7da13ab94e4dfb085cc4e57a62 100644 (file)
@@ -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;
 }
 
 /*************************************************************************