PM / devfreq: rockchip_dmc: Fix error handling
authorFinley Xiao <finley.xiao@rock-chips.com>
Thu, 11 May 2017 10:06:12 +0000 (18:06 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Thu, 11 May 2017 11:29:19 +0000 (19:29 +0800)
It never has the mutex_lock counterpart before goto.

Change-Id: I937e79bc65433cb1c173fe0cb221e7d69586046c
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
drivers/devfreq/rockchip_dmc.c

index 00cb8eba65c3cab27fe9cb3464cba9dc958864d4..4cf6a1999248298ddd520ab231e723d13576cd26 100644 (file)
@@ -197,7 +197,7 @@ static int rockchip_dmcfreq_target(struct device *dev, unsigned long *freq,
                if (err) {
                        dev_err(dev, "Cannot set voltage %lu uV\n",
                                target_volt);
-                       goto out;
+                       return err;
                }
        }