All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Pawel Osciak <p.osciak@samsung.com>
Cc: linux-media@vger.kernel.org, m.szyprowski@samsung.com,
	kyungmin.park@samsung.com, hverkuil@xs4all.nl,
	m-karicheri2@ti.com
Subject: Re: [PATCH v1 1/4] v4l: add missing checks for kzalloc returning NULL.
Date: Mon, 22 Feb 2010 14:42:03 -0300	[thread overview]
Message-ID: <4B82C1EB.4000906@redhat.com> (raw)
In-Reply-To: <1266855010-2198-2-git-send-email-p.osciak@samsung.com>

Pawel Osciak wrote:
> Signed-off-by: Pawel Osciak <p.osciak@samsung.com>

This one is not dependent on the RFC, and fixes a bug, so I'm applying it.

Thanks for catching it!

Cheers,
Mauro.

> ---
>  drivers/media/video/videobuf-dma-sg.c  |    2 ++
>  drivers/media/video/videobuf-vmalloc.c |    2 ++
>  2 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/media/video/videobuf-dma-sg.c b/drivers/media/video/videobuf-dma-sg.c
> index fa78555..fcd045e 100644
> --- a/drivers/media/video/videobuf-dma-sg.c
> +++ b/drivers/media/video/videobuf-dma-sg.c
> @@ -418,6 +418,8 @@ static void *__videobuf_alloc(size_t size)
>  	struct videobuf_buffer *vb;
>  
>  	vb = kzalloc(size+sizeof(*mem),GFP_KERNEL);
> +	if (!vb)
> +		return vb;
>  
>  	mem = vb->priv = ((char *)vb)+size;
>  	mem->magic=MAGIC_SG_MEM;
> diff --git a/drivers/media/video/videobuf-vmalloc.c b/drivers/media/video/videobuf-vmalloc.c
> index d6e6a28..136e093 100644
> --- a/drivers/media/video/videobuf-vmalloc.c
> +++ b/drivers/media/video/videobuf-vmalloc.c
> @@ -138,6 +138,8 @@ static void *__videobuf_alloc(size_t size)
>  	struct videobuf_buffer *vb;
>  
>  	vb = kzalloc(size+sizeof(*mem),GFP_KERNEL);
> +	if (!vb)
> +		return vb;
>  
>  	mem = vb->priv = ((char *)vb)+size;
>  	mem->magic=MAGIC_VMAL_MEM;


-- 

Cheers,
Mauro

  reply	other threads:[~2010-02-22 17:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-22 16:10 [PATCH/RFC v1 0/4] Multi-plane video buffer support for V4L2 API and videobuf Pawel Osciak
2010-02-22 16:10 ` [PATCH v1 1/4] v4l: add missing checks for kzalloc returning NULL Pawel Osciak
2010-02-22 17:42   ` Mauro Carvalho Chehab [this message]
2010-02-22 16:10 ` [PATCH v1 2/4] v4l: Add support for multi-plane buffers to V4L2 API Pawel Osciak
2010-02-22 16:10 ` [PATCH v1 3/4] v4l: videobuf: Add support for multi-plane buffers Pawel Osciak
2010-02-22 16:10 ` [PATCH v1 4/4] v4l: vivi: add 2- and 3-planar YCbCr422 Pawel Osciak
2010-02-22 16:10 ` [EXAMPLE v1] Test application for multiplane vivi driver Pawel Osciak
2010-02-22 17:49 ` [PATCH/RFC v1 0/4] Multi-plane video buffer support for V4L2 API and videobuf Mauro Carvalho Chehab
2010-02-23  9:39   ` Pawel Osciak

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=4B82C1EB.4000906@redhat.com \
    --to=mchehab@redhat.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m-karicheri2@ti.com \
    --cc=m.szyprowski@samsung.com \
    --cc=p.osciak@samsung.com \
    /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.