[PATCH 1/2] [ARM] [IMX]: Removed superfluous checks for argument validity.
Vladimir Zapolskiy
vzapolskiy at gmail.com
Wed Mar 17 03:11:55 EDT 2010
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 at gmail.com>
Cc: Sascha Hauer <s.hauer at pengutronix.de>
Cc: Uwe Kleine-König <u.kleine-koenig at 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
More information about the linux-arm-kernel
mailing list