From: Figo.zhang Date: Wed, 10 Jun 2009 04:18:38 +0000 (+0000) Subject: tehuti: No need check vfree() pointer. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c0feed87fe452c20681ae29909adaecedd1ec9f3;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c index 093807a182f..3c2679cd196 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; } /*************************************************************************