pwm: rockchip: Fix the warning for rockchip_linux_defconfig
authorDavid Wu <david.wu@rock-chips.com>
Wed, 8 Mar 2017 02:51:43 +0000 (10:51 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Wed, 8 Mar 2017 08:17:30 +0000 (16:17 +0800)
This patch fix the following warning:
drivers/pwm/pwm-rockchip.c:176:6: warning: unused variable 'ret' [-Wunused-variable]

Change-Id: I9ac08ad08fdefee5b875d36592936b07f032586c
Signed-off-by: David Wu <david.wu@rock-chips.com>
drivers/pwm/pwm-rockchip.c

index 004514a255b9efde29c5752db67aa7a9a4ff939d..de315617e44e1e7c308e21297e64f4460031b395 100644 (file)
@@ -173,7 +173,6 @@ static int rockchip_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
        struct rockchip_pwm_chip *pc = to_rockchip_pwm_chip(chip);
        unsigned long period, duty;
        u64 clk_rate, div;
-       int ret;
 
        clk_rate = clk_get_rate(pc->clk);
 
@@ -194,6 +193,8 @@ static int rockchip_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
 
 #ifdef CONFIG_FB_ROCKCHIP
        if (!pc->data->regs.ctrl) {
+               int ret;
+
                ret = rk_fb_set_vop_pwm();
                if (ret)
                        dev_err(pc->chip.dev, "rk_fb_set_vop_pwm failed: %d\n", ret);