* [PATCH 2/4] pwc: Add return code check at vb2_queue_init()
@ 2012-09-17 13:47 elezegarcia
2012-09-24 14:16 ` Hans de Goede
0 siblings, 1 reply; 2+ messages in thread
From: elezegarcia @ 2012-09-17 13:47 UTC (permalink / raw)
To: Mauro Carvalho Chehab, linux-media; +Cc: Ezequiel Garcia, Hans de Goede
From: Ezequiel Garcia <elezegarcia@gmail.com>
This function returns an integer and it's mandatory
to check the return code.
Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
drivers/media/usb/pwc/pwc-if.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
index 42e36ba..31d082e 100644
--- a/drivers/media/usb/pwc/pwc-if.c
+++ b/drivers/media/usb/pwc/pwc-if.c
@@ -1000,7 +1000,9 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
pdev->vb_queue.buf_struct_size = sizeof(struct pwc_frame_buf);
pdev->vb_queue.ops = &pwc_vb_queue_ops;
pdev->vb_queue.mem_ops = &vb2_vmalloc_memops;
- vb2_queue_init(&pdev->vb_queue);
+ rc = vb2_queue_init(&pdev->vb_queue);
+ if (rc)
+ goto err_free_mem;
/* Init video_device structure */
memcpy(&pdev->vdev, &pwc_template, sizeof(pwc_template));
--
1.7.8.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 2/4] pwc: Add return code check at vb2_queue_init()
2012-09-17 13:47 [PATCH 2/4] pwc: Add return code check at vb2_queue_init() elezegarcia
@ 2012-09-24 14:16 ` Hans de Goede
0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2012-09-24 14:16 UTC (permalink / raw)
To: elezegarcia; +Cc: Mauro Carvalho Chehab, linux-media
Hi,
Thanks I've added this to my media tree and it will be included in
my next pull-req to Mauro.
Regards,
Hans
On 09/17/2012 03:47 PM, elezegarcia@gmail.com wrote:
> From: Ezequiel Garcia <elezegarcia@gmail.com>
>
> This function returns an integer and it's mandatory
> to check the return code.
>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
> ---
> drivers/media/usb/pwc/pwc-if.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
> index 42e36ba..31d082e 100644
> --- a/drivers/media/usb/pwc/pwc-if.c
> +++ b/drivers/media/usb/pwc/pwc-if.c
> @@ -1000,7 +1000,9 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
> pdev->vb_queue.buf_struct_size = sizeof(struct pwc_frame_buf);
> pdev->vb_queue.ops = &pwc_vb_queue_ops;
> pdev->vb_queue.mem_ops = &vb2_vmalloc_memops;
> - vb2_queue_init(&pdev->vb_queue);
> + rc = vb2_queue_init(&pdev->vb_queue);
> + if (rc)
> + goto err_free_mem;
>
> /* Init video_device structure */
> memcpy(&pdev->vdev, &pwc_template, sizeof(pwc_template));
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-24 14:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-17 13:47 [PATCH 2/4] pwc: Add return code check at vb2_queue_init() elezegarcia
2012-09-24 14:16 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).