All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] V4L/DVB: unlock on error path
@ 2010-08-12  7:41 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2010-08-12  7:41 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Pawel Osciak, Kyungmin Park, Sylwester Nawrocki, linux-media,
	kernel-janitors

If we return directly here then we miss out on some mutex_unlock()s

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/media/video/s5p-fimc/fimc-core.c b/drivers/media/video/s5p-fimc/fimc-core.c
index b151c7b..1beb226 100644
--- a/drivers/media/video/s5p-fimc/fimc-core.c
+++ b/drivers/media/video/s5p-fimc/fimc-core.c
@@ -822,7 +822,8 @@ static int fimc_m2m_s_fmt(struct file *file, void *priv, struct v4l2_format *f)
 	} else {
 		v4l2_err(&ctx->fimc_dev->m2m.v4l2_dev,
 			 "Wrong buffer/video queue type (%d)\n", f->type);
-		return -EINVAL;
+		ret = -EINVAL;
+		goto s_fmt_out;
 	}
 
 	pix = &f->fmt.pix;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [patch] V4L/DVB: unlock on error path
@ 2010-08-12  7:41 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2010-08-12  7:41 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Pawel Osciak, Kyungmin Park, Sylwester Nawrocki, linux-media,
	kernel-janitors

If we return directly here then we miss out on some mutex_unlock()s

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/media/video/s5p-fimc/fimc-core.c b/drivers/media/video/s5p-fimc/fimc-core.c
index b151c7b..1beb226 100644
--- a/drivers/media/video/s5p-fimc/fimc-core.c
+++ b/drivers/media/video/s5p-fimc/fimc-core.c
@@ -822,7 +822,8 @@ static int fimc_m2m_s_fmt(struct file *file, void *priv, struct v4l2_format *f)
 	} else {
 		v4l2_err(&ctx->fimc_dev->m2m.v4l2_dev,
 			 "Wrong buffer/video queue type (%d)\n", f->type);
-		return -EINVAL;
+		ret = -EINVAL;
+		goto s_fmt_out;
 	}
 
 	pix = &f->fmt.pix;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [patch] V4L/DVB: unlock on error path
  2010-08-12  7:41 ` Dan Carpenter
@ 2010-08-19 16:16   ` Sylwester Nawrocki
  -1 siblings, 0 replies; 4+ messages in thread
From: Sylwester Nawrocki @ 2010-08-19 16:16 UTC (permalink / raw)
  To: 'Dan Carpenter'
  Cc: 'Mauro Carvalho Chehab', linux-media, kernel-janitors

Thank you for catching this up. I had this fixed already, but due to hassle
caused by having multiple versions of the driver this bug somehow made it
unnoticed to mainline.

Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

> -----Original Message-----
> From: Dan Carpenter [mailto:error27@gmail.com]
> Sent: Thursday, August 12, 2010 9:42 AM
> To: Mauro Carvalho Chehab
> Cc: Pawel Osciak; Kyungmin Park; Sylwester Nawrocki; linux-
> media@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: [patch] V4L/DVB: unlock on error path
> 
> If we return directly here then we miss out on some mutex_unlock()s
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> diff --git a/drivers/media/video/s5p-fimc/fimc-core.c
> b/drivers/media/video/s5p-fimc/fimc-core.c
> index b151c7b..1beb226 100644
> --- a/drivers/media/video/s5p-fimc/fimc-core.c
> +++ b/drivers/media/video/s5p-fimc/fimc-core.c
> @@ -822,7 +822,8 @@ static int fimc_m2m_s_fmt(struct file *file, void
> *priv, struct v4l2_format *f)
>  	} else {
>  		v4l2_err(&ctx->fimc_dev->m2m.v4l2_dev,
>  			 "Wrong buffer/video queue type (%d)\n", f->type);
> -		return -EINVAL;
> +		ret = -EINVAL;
> +		goto s_fmt_out;
>  	}
> 
>  	pix = &f->fmt.pix;



^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [patch] V4L/DVB: unlock on error path
@ 2010-08-19 16:16   ` Sylwester Nawrocki
  0 siblings, 0 replies; 4+ messages in thread
From: Sylwester Nawrocki @ 2010-08-19 16:16 UTC (permalink / raw)
  To: 'Dan Carpenter'
  Cc: 'Mauro Carvalho Chehab', linux-media, kernel-janitors

Thank you for catching this up. I had this fixed already, but due to hassle
caused by having multiple versions of the driver this bug somehow made it
unnoticed to mainline.

Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

> -----Original Message-----
> From: Dan Carpenter [mailto:error27@gmail.com]
> Sent: Thursday, August 12, 2010 9:42 AM
> To: Mauro Carvalho Chehab
> Cc: Pawel Osciak; Kyungmin Park; Sylwester Nawrocki; linux-
> media@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: [patch] V4L/DVB: unlock on error path
> 
> If we return directly here then we miss out on some mutex_unlock()s
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> diff --git a/drivers/media/video/s5p-fimc/fimc-core.c
> b/drivers/media/video/s5p-fimc/fimc-core.c
> index b151c7b..1beb226 100644
> --- a/drivers/media/video/s5p-fimc/fimc-core.c
> +++ b/drivers/media/video/s5p-fimc/fimc-core.c
> @@ -822,7 +822,8 @@ static int fimc_m2m_s_fmt(struct file *file, void
> *priv, struct v4l2_format *f)
>  	} else {
>  		v4l2_err(&ctx->fimc_dev->m2m.v4l2_dev,
>  			 "Wrong buffer/video queue type (%d)\n", f->type);
> -		return -EINVAL;
> +		ret = -EINVAL;
> +		goto s_fmt_out;
>  	}
> 
>  	pix = &f->fmt.pix;



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-19 16:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-12  7:41 [patch] V4L/DVB: unlock on error path Dan Carpenter
2010-08-12  7:41 ` Dan Carpenter
2010-08-19 16:16 ` Sylwester Nawrocki
2010-08-19 16:16   ` Sylwester Nawrocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.