diff mbox

[02/10] pwc: Remove unneeded struct vb2_queue clearing

Message ID 1345727311-27478-2-git-send-email-elezegarcia@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ezequiel Garcia Aug. 23, 2012, 1:08 p.m. UTC
struct vb2_queue is allocated through kzalloc as part of a larger struct,
there's no need to clear it.

Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
 drivers/media/usb/pwc/pwc-if.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Comments

Hans de Goede Sept. 9, 2012, 9:57 p.m. UTC | #1
Hi,

Thanks! Applied to my gspca / media / pwc tree and included in my pull-req for 3.7 which I just send out.

Regards,

Hans


On 08/23/2012 03:08 PM, Ezequiel Garcia wrote:
> struct vb2_queue is allocated through kzalloc as part of a larger struct,
> there's no need to clear it.
>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
> ---
>   drivers/media/usb/pwc/pwc-if.c |    1 -
>   1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
> index de7c7ba..825c61a 100644
> --- a/drivers/media/usb/pwc/pwc-if.c
> +++ b/drivers/media/usb/pwc/pwc-if.c
> @@ -994,7 +994,6 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
>   	pdev->power_save = my_power_save;
>
>   	/* Init videobuf2 queue structure */
> -	memset(&pdev->vb_queue, 0, sizeof(pdev->vb_queue));
>   	pdev->vb_queue.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
>   	pdev->vb_queue.io_modes = VB2_MMAP | VB2_USERPTR | VB2_READ;
>   	pdev->vb_queue.drv_priv = pdev;
>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
index de7c7ba..825c61a 100644
--- a/drivers/media/usb/pwc/pwc-if.c
+++ b/drivers/media/usb/pwc/pwc-if.c
@@ -994,7 +994,6 @@  static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
 	pdev->power_save = my_power_save;
 
 	/* Init videobuf2 queue structure */
-	memset(&pdev->vb_queue, 0, sizeof(pdev->vb_queue));
 	pdev->vb_queue.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
 	pdev->vb_queue.io_modes = VB2_MMAP | VB2_USERPTR | VB2_READ;
 	pdev->vb_queue.drv_priv = pdev;