summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorUjwal Patel <ujwalp@codeaurora.org>2012-11-05 08:41:49 -0800
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:13:08 -0700
commit73bd04ecda9e07a7e763539ecdccb572058faaaf (patch)
tree070816f8b8b757ff2b7e86d6b833ac9b71d5b419 /drivers/video/fbdev
parentc2a3e416903d166169be44d9852d8eef5d0e708b (diff)
msm: mdss: Fix returning incorrect error number
Instead of returning actual error number, current code returns boolean value of error present. Fix this issue by using PTR_RET macro instead of IS_ERR during error check. Change-Id: I61f0e57dd918c98ae4699993fa526e31654bebb3 Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/msm/mdss_io_util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/video/fbdev/msm/mdss_io_util.c b/drivers/video/fbdev/msm/mdss_io_util.c
index f5a3e1b31ef7..2c4e99864a89 100644
--- a/drivers/video/fbdev/msm/mdss_io_util.c
+++ b/drivers/video/fbdev/msm/mdss_io_util.c
@@ -137,7 +137,7 @@ int msm_dss_config_vreg(struct device *dev, struct dss_vreg *in_vreg,
curr_vreg = &in_vreg[i];
curr_vreg->vreg = regulator_get(dev,
curr_vreg->vreg_name);
- rc = IS_ERR(curr_vreg->vreg);
+ rc = PTR_RET(curr_vreg->vreg);
if (rc) {
DEV_ERR("%pS->%s: %s get failed. rc=%d\n",
__builtin_return_address(0), __func__,
@@ -216,7 +216,7 @@ int msm_dss_enable_vreg(struct dss_vreg *in_vreg, int num_vreg, int enable)
int i = 0, rc = 0;
if (enable) {
for (i = 0; i < num_vreg; i++) {
- rc = IS_ERR(in_vreg[i].vreg);
+ rc = PTR_RET(in_vreg[i].vreg);
if (rc) {
DEV_ERR("%pS->%s: %s regulator error. rc=%d\n",
__builtin_return_address(0), __func__,
@@ -287,7 +287,7 @@ int msm_dss_get_clk(struct device *dev, struct dss_clk *clk_arry, int num_clk)
for (i = 0; i < num_clk; i++) {
clk_arry[i].clk = clk_get(dev, clk_arry[i].clk_name);
- rc = IS_ERR(clk_arry[i].clk);
+ rc = PTR_RET(clk_arry[i].clk);
if (rc) {
DEV_ERR("%pS->%s: '%s' get failed. rc=%d\n",
__builtin_return_address(0), __func__,