From 73bd04ecda9e07a7e763539ecdccb572058faaaf Mon Sep 17 00:00:00 2001 From: Ujwal Patel Date: Mon, 5 Nov 2012 08:41:49 -0800 Subject: 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 --- drivers/video/fbdev/msm/mdss_io_util.c | 6 +++--- 1 file 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__, -- cgit v1.2.3