summaryrefslogtreecommitdiff
path: root/drivers/video/mxc
diff options
context:
space:
mode:
authorJason Chen <b02280@freescale.com>2012-01-13 17:04:36 +0800
committerJason Chen <b02280@freescale.com>2012-02-01 17:58:47 +0800
commitf411fd9dfdcef18fd340a03a849ac6d0d1539695 (patch)
treec9685c0f65412ee5da51149c1ede6c74e53223f5 /drivers/video/mxc
parent984d293a1a355ab7919ade276a9d42cae96758cc (diff)
ENGR00171987 ipuv3 fb: add error handler for mxcfb_blank
add error handler for mxcfb_blank. Signed-off-by: Jason Chen <b02280@freescale.com> (cherry picked from commit 1999793303187b4aa9ccbdfc53f9a4c6ab59e749)
Diffstat (limited to 'drivers/video/mxc')
-rw-r--r--drivers/video/mxc/mxc_ipuv3_fb.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c
index 23202cea02b7..ba43b512e33a 100644
--- a/drivers/video/mxc/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc/mxc_ipuv3_fb.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2004-2011 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2004-2012 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -265,6 +265,7 @@ static int _setup_disp_channel2(struct fb_info *fbi)
if (retval) {
dev_err(fbi->device,
"ipu_init_channel_buffer error %d\n", retval);
+ return retval;
}
/* update u/v offset */
@@ -442,8 +443,10 @@ static int mxcfb_set_par(struct fb_info *fbi)
}
retval = _setup_disp_channel2(fbi);
- if (retval)
+ if (retval) {
+ ipu_uninit_channel(mxc_fbi->ipu, mxc_fbi->ipu_ch);
return retval;
+ }
ipu_enable_channel(mxc_fbi->ipu, mxc_fbi->ipu_ch);
@@ -1174,6 +1177,7 @@ static int mxcfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
static int mxcfb_blank(int blank, struct fb_info *info)
{
struct mxcfb_info *mxc_fbi = (struct mxcfb_info *)info->par;
+ int ret = 0;
dev_dbg(info->device, "blank = %d\n", blank);
@@ -1195,11 +1199,12 @@ static int mxcfb_blank(int blank, struct fb_info *info)
ipu_uninit_channel(mxc_fbi->ipu, mxc_fbi->ipu_ch);
break;
case FB_BLANK_UNBLANK:
- mxcfb_set_par(info);
+ ret = mxcfb_set_par(info);
break;
}
- mxc_fbi->cur_blank = blank;
- return 0;
+ if (!ret)
+ mxc_fbi->cur_blank = blank;
+ return ret;
}
/*