linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] [ARM] [IMX]: Removed superfluous checks for argument validity.
@ 2010-03-17  7:11 Vladimir Zapolskiy
  2010-03-17  7:11 ` [PATCH 2/2] [ARM] [IMX]: Fix clock usecount counter from underflow Vladimir Zapolskiy
  2010-03-17  9:13 ` [PATCH 1/2] [ARM] [IMX]: Removed superfluous checks for argument validity Uwe Kleine-König
  0 siblings, 2 replies; 14+ messages in thread
From: Vladimir Zapolskiy @ 2010-03-17  7:11 UTC (permalink / raw)
  To: linux-arm-kernel

The checks for clk argument are doubled in __clk_disable() and
__clk_enable() functions and thus may be skipped in clk_disable() and
clk_enable() bodies.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
---
 arch/arm/plat-mxc/clock.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/arch/arm/plat-mxc/clock.c b/arch/arm/plat-mxc/clock.c
index 323ff8c..2daec3c 100644
--- a/arch/arm/plat-mxc/clock.c
+++ b/arch/arm/plat-mxc/clock.c
@@ -82,9 +82,6 @@ int clk_enable(struct clk *clk)
 {
 	int ret = 0;
 
-	if (clk == NULL || IS_ERR(clk))
-		return -EINVAL;
-
 	mutex_lock(&clocks_mutex);
 	ret = __clk_enable(clk);
 	mutex_unlock(&clocks_mutex);
@@ -99,9 +96,6 @@ EXPORT_SYMBOL(clk_enable);
  */
 void clk_disable(struct clk *clk)
 {
-	if (clk == NULL || IS_ERR(clk))
-		return;
-
 	mutex_lock(&clocks_mutex);
 	__clk_disable(clk);
 	mutex_unlock(&clocks_mutex);
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-03-18 14:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-17  7:11 [PATCH 1/2] [ARM] [IMX]: Removed superfluous checks for argument validity Vladimir Zapolskiy
2010-03-17  7:11 ` [PATCH 2/2] [ARM] [IMX]: Fix clock usecount counter from underflow Vladimir Zapolskiy
2010-03-17  9:20   ` Uwe Kleine-König
2010-03-17 10:15     ` javier Martin
2010-03-17 10:57       ` Vladimir Zapolskiy
2010-03-17 11:03     ` [PATCH 2/2 v2] [ARM] [IMX]: Fix clock use counter from underflow on multiple clk_disable() Vladimir Zapolskiy
2010-03-18  8:30       ` Uwe Kleine-König
2010-03-18 13:21         ` Vladimir Zapolskiy
2010-03-17  9:13 ` [PATCH 1/2] [ARM] [IMX]: Removed superfluous checks for argument validity Uwe Kleine-König
2010-03-17 10:34   ` Vladimir Zapolskiy
2010-03-18  8:37     ` Uwe Kleine-König
2010-03-18 13:07       ` Vladimir Zapolskiy
2010-03-18 13:27       ` [PATCH 1/2 v2] imx: optimize __clk_enable() and __clk_disable() functions Vladimir Zapolskiy
2010-03-18 14:23         ` Vladimir Zapolskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).