]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/media/platform/vim2m.c
Merge branches 'for-4.11/upstream-fixes', 'for-4.12/accutouch', 'for-4.12/cp2112...
[mirror_ubuntu-artful-kernel.git] / drivers / media / platform / vim2m.c
index a98f679bd88d0ba57ec1c8b99afc4174c6e1d88d..970b9b6dab25562200e6a0243b1d50218aafab45 100644 (file)
@@ -907,6 +907,7 @@ static int vim2m_open(struct file *file)
        if (hdl->error) {
                rc = hdl->error;
                v4l2_ctrl_handler_free(hdl);
+               kfree(ctx);
                goto open_unlock;
        }
        ctx->fh.ctrl_handler = hdl;
@@ -928,6 +929,7 @@ static int vim2m_open(struct file *file)
                rc = PTR_ERR(ctx->fh.m2m_ctx);
 
                v4l2_ctrl_handler_free(hdl);
+               v4l2_fh_exit(&ctx->fh);
                kfree(ctx);
                goto open_unlock;
        }