From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: pawel@osciak.com, kyungmin.park@samsung.com, mchehab@redhat.com,
yongjun_wei@trendmicro.com.cn, linux-media@vger.kernel.org
Subject: Re: [PATCH] [media] v4l: vb2: fix error return code in __vb2_init_fileio()
Date: Tue, 14 May 2013 08:14:57 +0200 [thread overview]
Message-ID: <5191D661.6030408@samsung.com> (raw)
In-Reply-To: <CAPgLHd9ydkkQ_yOmhnU1awN08kBhiM-ZryGBqq8S0qisHkYvqA@mail.gmail.com>
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
prev parent reply other threads:[~2013-05-14 6:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5191D661.6030408@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=pawel@osciak.com \
--cc=weiyj.lk@gmail.com \
--cc=yongjun_wei@trendmicro.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.