[media] s5p-mfc: Context handling in open() bugfix
authorKamil Debski <k.debski@samsung.com>
Thu, 22 Nov 2012 13:00:28 +0000 (10:00 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 6 Jan 2013 11:59:20 +0000 (09:59 -0200)
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/s5p-mfc/s5p_mfc.c

index 4fcd075e86991ce8abe3aaf12268c027739db72d..b1d7f9a9b99683686a0d58a2d842e50ad147dcd4 100644 (file)
@@ -855,16 +855,16 @@ err_queue_init:
                s5p_mfc_deinit_hw(dev);
 err_init_hw:
 err_load_fw:
-       dev->ctx[ctx->num] = NULL;
-       del_timer_sync(&dev->watchdog_timer);
 err_pwr_enable:
        if (dev->num_inst == 1) {
                if (s5p_mfc_power_off() < 0)
                        mfc_err("power off failed\n");
+               del_timer_sync(&dev->watchdog_timer);
        }
 err_ctrls_setup:
        s5p_mfc_dec_ctrls_delete(ctx);
 err_bad_node:
+       dev->ctx[ctx->num] = NULL;
 err_no_ctx:
        v4l2_fh_del(&ctx->fh);
        v4l2_fh_exit(&ctx->fh);