[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130509222527.054946730@linuxfoundation.org>
Date: Thu, 9 May 2013 15:24:55 -0700
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Axel Lin <axel.lin@...ics.com>,
Viresh Kumar <viresh.kumar@...aro.org>,
Thierry Reding <thierry.reding@...onic-design.de>
Subject: [ 05/73] pwm: spear: Fix checking return value of clk_enable() and clk_prepare()
3.9-stable review patch. If anyone has any objections, please let me know.
------------------
From: Axel Lin <axel.lin@...ics.com>
commit 563861cd633ae52932843477bb6ca3f1c9e2f78b upstream.
The logic to check return value of clk_enable() and clk_prepare() is reversed,
fix it.
Signed-off-by: Axel Lin <axel.lin@...ics.com>
Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
Signed-off-by: Thierry Reding <thierry.reding@...onic-design.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/pwm/pwm-spear.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/drivers/pwm/pwm-spear.c
+++ b/drivers/pwm/pwm-spear.c
@@ -143,7 +143,7 @@ static int spear_pwm_enable(struct pwm_c
u32 val;
rc = clk_enable(pc->clk);
- if (!rc)
+ if (rc)
return rc;
val = spear_pwm_readl(pc, pwm->hwpwm, PWMCR);
@@ -209,12 +209,12 @@ static int spear_pwm_probe(struct platfo
pc->chip.npwm = NUM_PWM;
ret = clk_prepare(pc->clk);
- if (!ret)
+ if (ret)
return ret;
if (of_device_is_compatible(np, "st,spear1340-pwm")) {
ret = clk_enable(pc->clk);
- if (!ret) {
+ if (ret) {
clk_unprepare(pc->clk);
return ret;
}
--
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