Merge branch 'fbdev-3.10-fixes' of git://gitorious.org/linux-omap-dss2/linux into...
[linux-2.6-block.git] / drivers / media / platform / omap / omap_vout.c
index 0a489bd29d6bf077222b14d13b56d1162d24f6f6..d338b19da544c92e8e1c73c66092ca96575bcb59 100644 (file)
@@ -648,9 +648,12 @@ static void omap_vout_isr(void *arg, unsigned int irqstatus)
 
        /* First save the configuration in ovelray structure */
        ret = omapvid_init(vout, addr);
-       if (ret)
+       if (ret) {
                printk(KERN_ERR VOUT_NAME
                        "failed to set overlay info\n");
+               goto vout_isr_err;
+       }
+
        /* Enable the pipeline and set the Go bit */
        ret = omapvid_apply_changes(vout);
        if (ret)
@@ -1660,13 +1663,16 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i)
        mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_EVSYNC_ODD
                | DISPC_IRQ_VSYNC2;
 
-       omap_dispc_register_isr(omap_vout_isr, vout, mask);
-
        /* First save the configuration in ovelray structure */
        ret = omapvid_init(vout, addr);
-       if (ret)
+       if (ret) {
                v4l2_err(&vout->vid_dev->v4l2_dev,
                                "failed to set overlay info\n");
+               goto streamon_err1;
+       }
+
+       omap_dispc_register_isr(omap_vout_isr, vout, mask);
+
        /* Enable the pipeline and set the Go bit */
        ret = omapvid_apply_changes(vout);
        if (ret)