Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1534671 > unrolled thread

[PATCH] bdisp: Clean up file handle in open() error path.

Started byShailendra Verma <shailendra.v@samsung.com>
First post2016-12-02 06:00 +0100
Last post2016-12-02 09:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] bdisp: Clean up file handle in open() error path. Shailendra Verma <shailendra.v@samsung.com> - 2016-12-02 06:00 +0100
    Re: [PATCH] bdisp: Clean up file handle in open() error path. Fabien DESSENNE <fabien.dessenne@st.com> - 2016-12-02 09:40 +0100

#1534671 — [PATCH] bdisp: Clean up file handle in open() error path.

FromShailendra Verma <shailendra.v@samsung.com>
Date2016-12-02 06:00 +0100
Subject[PATCH] bdisp: Clean up file handle in open() error path.
Message-ID<sJO6Z-7cp-1@gated-at.bofh.it>
The File handle is not yet added in the vdev list.So no need to call 
v4l2_fh_del(&ctx->fh)if it fails to create control.

Signed-off-by: Shailendra Verma <shailendra.v@samsung.com>
---
 drivers/media/platform/sti/bdisp/bdisp-v4l2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
index 45f82b5..fbf302f 100644
--- a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
+++ b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
@@ -632,8 +632,8 @@ static int bdisp_open(struct file *file)
 
 error_ctrls:
 	bdisp_ctrls_delete(ctx);
-error_fh:
 	v4l2_fh_del(&ctx->fh);
+error_fh:
 	v4l2_fh_exit(&ctx->fh);
 	bdisp_hw_free_nodes(ctx);
 mem_ctx:
-- 
1.7.9.5

[toc] | [next] | [standalone]


#1534740

FromFabien DESSENNE <fabien.dessenne@st.com>
Date2016-12-02 09:40 +0100
Message-ID<sJRxT-1gM-9@gated-at.bofh.it>
In reply to#1534671
Hi Shailendra,
Thank you for the patch, it's good for me.


On 12/02/2016 05:48 AM, Shailendra Verma wrote:
> The File handle is not yet added in the vdev list.So no need to call
> v4l2_fh_del(&ctx->fh)if it fails to create control.
>
> Signed-off-by: Shailendra Verma <shailendra.v@samsung.com>

Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com>

> ---
>   drivers/media/platform/sti/bdisp/bdisp-v4l2.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
> index 45f82b5..fbf302f 100644
> --- a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
> +++ b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c
> @@ -632,8 +632,8 @@ static int bdisp_open(struct file *file)
>   
>   error_ctrls:
>   	bdisp_ctrls_delete(ctx);
> -error_fh:
>   	v4l2_fh_del(&ctx->fh);
> +error_fh:
>   	v4l2_fh_exit(&ctx->fh);
>   	bdisp_hw_free_nodes(ctx);
>   mem_ctx:

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web