This is a note to let you know that I've just added the patch titled

    pwm: spear: Fix checking return value of clk_enable() and clk_prepare()

to the 3.8-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pwm-spear-fix-checking-return-value-of-clk_enable-and-clk_prepare.patch
and it can be found in the queue-3.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 563861cd633ae52932843477bb6ca3f1c9e2f78b Mon Sep 17 00:00:00 2001
From: Axel Lin <[email protected]>
Date: Sat, 30 Mar 2013 20:43:22 +0800
Subject: pwm: spear: Fix checking return value of clk_enable() and clk_prepare()

From: Axel Lin <[email protected]>

commit 563861cd633ae52932843477bb6ca3f1c9e2f78b upstream.

The logic to check return value of clk_enable() and clk_prepare() is reversed,
fix it.

Signed-off-by: Axel Lin <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 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;
                }


Patches currently in stable-queue which might be from [email protected] are

queue-3.8/pwm-spear-fix-checking-return-value-of-clk_enable-and-clk_prepare.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to