* [PATCH] net: no need check in tehuti.c
@ 2009-06-10 14:18 Figo.zhang
2009-06-11 9:51 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Figo.zhang @ 2009-06-10 14:18 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
vfree() does its own 'NULL' check, so no need for check before
calling it.
Signed-off-by: Figo.zhang <figo1802@gmail.com>
---
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 7f4a968..430f2af 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;
}
/*************************************************************************
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: no need check in tehuti.c
2009-06-10 14:18 [PATCH] net: no need check in tehuti.c Figo.zhang
@ 2009-06-11 9:51 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-06-11 9:51 UTC (permalink / raw)
To: figo1802; +Cc: netdev
From: "Figo.zhang" <figo1802@gmail.com>
Date: Wed, 10 Jun 2009 22:18:38 +0800
> vfree() does its own 'NULL' check, so no need for check before
> calling it.
>
> Signed-off-by: Figo.zhang <figo1802@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-11 9:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-10 14:18 [PATCH] net: no need check in tehuti.c Figo.zhang
2009-06-11 9:51 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox