* [PATCH] [media] v4l: vb2: fix error return code in __vb2_init_fileio()
@ 2013-05-13 5:48 Wei Yongjun
2013-05-13 7:25 ` Sakari Ailus
2013-05-14 6:14 ` Marek Szyprowski
0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2013-05-13 5:48 UTC (permalink / raw)
To: pawel, m.szyprowski, kyungmin.park, mchehab; +Cc: yongjun_wei, linux-media
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Fix to return -EINVAL in the get kernel address error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/media/v4l2-core/videobuf2-core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
index 7d833ee..7bd3ee6 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -2193,8 +2193,10 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read)
*/
for (i = 0; i < q->num_buffers; i++) {
fileio->bufs[i].vaddr = vb2_plane_vaddr(q->bufs[i], 0);
- if (fileio->bufs[i].vaddr == NULL)
+ if (fileio->bufs[i].vaddr == NULL) {
+ ret = -EINVAL;
goto err_reqbufs;
+ }
fileio->bufs[i].size = vb2_plane_size(q->bufs[i], 0);
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] [media] v4l: vb2: fix error return code in __vb2_init_fileio()
2013-05-13 5:48 [PATCH] [media] v4l: vb2: fix error return code in __vb2_init_fileio() Wei Yongjun
@ 2013-05-13 7:25 ` Sakari Ailus
2013-05-14 6:14 ` Marek Szyprowski
1 sibling, 0 replies; 3+ messages in thread
From: Sakari Ailus @ 2013-05-13 7:25 UTC (permalink / raw)
To: Wei Yongjun
Cc: pawel, m.szyprowski, kyungmin.park, mchehab, yongjun_wei,
linux-media
Hi Wei,
On Mon, May 13, 2013 at 01:48:45PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Fix to return -EINVAL in the get kernel address error handling
> case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/media/v4l2-core/videobuf2-core.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
> index 7d833ee..7bd3ee6 100644
> --- a/drivers/media/v4l2-core/videobuf2-core.c
> +++ b/drivers/media/v4l2-core/videobuf2-core.c
> @@ -2193,8 +2193,10 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read)
> */
> for (i = 0; i < q->num_buffers; i++) {
> fileio->bufs[i].vaddr = vb2_plane_vaddr(q->bufs[i], 0);
> - if (fileio->bufs[i].vaddr == NULL)
> + if (fileio->bufs[i].vaddr == NULL) {
> + ret = -EINVAL;
> goto err_reqbufs;
> + }
> fileio->bufs[i].size = vb2_plane_size(q->bufs[i], 0);
> }
>
>
Nice patch!
Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi>
--
Kind regards,
Sakari Ailus
e-mail: sakari.ailus@iki.fi XMPP: sailus@retiisi.org.uk
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [media] v4l: vb2: fix error return code in __vb2_init_fileio()
2013-05-13 5:48 [PATCH] [media] v4l: vb2: fix error return code in __vb2_init_fileio() Wei Yongjun
2013-05-13 7:25 ` Sakari Ailus
@ 2013-05-14 6:14 ` Marek Szyprowski
1 sibling, 0 replies; 3+ messages in thread
From: Marek Szyprowski @ 2013-05-14 6:14 UTC (permalink / raw)
To: Wei Yongjun; +Cc: pawel, kyungmin.park, mchehab, yongjun_wei, linux-media
Hello,
On 2013-05-13 07:48, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Fix to return -EINVAL in the get kernel address error handling
> case instead of 0, as done elsewhere in this function.
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> drivers/media/v4l2-core/videobuf2-core.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
> index 7d833ee..7bd3ee6 100644
> --- a/drivers/media/v4l2-core/videobuf2-core.c
> +++ b/drivers/media/v4l2-core/videobuf2-core.c
> @@ -2193,8 +2193,10 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read)
> */
> for (i = 0; i < q->num_buffers; i++) {
> fileio->bufs[i].vaddr = vb2_plane_vaddr(q->bufs[i], 0);
> - if (fileio->bufs[i].vaddr == NULL)
> + if (fileio->bufs[i].vaddr == NULL) {
> + ret = -EINVAL;
> goto err_reqbufs;
> + }
> fileio->bufs[i].size = vb2_plane_size(q->bufs[i], 0);
> }
>
>
>
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-14 6:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-13 5:48 [PATCH] [media] v4l: vb2: fix error return code in __vb2_init_fileio() Wei Yongjun
2013-05-13 7:25 ` Sakari Ailus
2013-05-14 6:14 ` Marek Szyprowski
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.