[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1353501977-6585-4-git-send-email-rgujare@ozmodevices.com>
Date: Wed, 21 Nov 2012 12:46:17 +0000
From: Rupesh Gujare <rgujare@...odevices.com>
To: <devel@...verdev.osuosl.org>
CC: <linux-kernel@...r.kernel.org>, <gregkh@...uxfoundation.org>,
<sachin.kamat@...aro.org>
Subject: [V2 PATCH 3/3] staging: ozwpan: Remove redundant null check before kfree in ozhcd.c
Call kfree only if required else return from function.
Signed-off-by: Sachin Kamat <sachin.kamat@...aro.org>
Signed-off-by: Rupesh Gujare <rgujare@...odevices.com>
---
drivers/staging/ozwpan/ozhcd.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
index 33c0009..585aa79 100644
--- a/drivers/staging/ozwpan/ozhcd.c
+++ b/drivers/staging/ozwpan/ozhcd.c
@@ -274,12 +274,12 @@ static void oz_free_urb_link(struct oz_urb_link *urbl)
if (g_link_pool_size < OZ_MAX_LINK_POOL_SIZE) {
urbl->link.next = g_link_pool;
g_link_pool = &urbl->link;
- urbl = 0;
g_link_pool_size++;
+ spin_unlock_irqrestore(&g_link_lock, irq_state);
+ return;
}
spin_unlock_irqrestore(&g_link_lock, irq_state);
- if (urbl)
- kfree(urbl);
+ kfree(urbl);
}
}
/*------------------------------------------------------------------------------
--
1.7.5.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists