Skip to content

Commit

Permalink
tehuti: No need check vfree() pointer.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Figo.zhang authored and David S. Miller committed Jun 11, 2009
1 parent 50d36a9 commit c0feed8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/net/tehuti.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}

/*************************************************************************
Expand Down

0 comments on commit c0feed8

Please sign in to comment.