Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2aa2342f2ba7caac0c5ed08331e883b7a72da2dd
Commit:     2aa2342f2ba7caac0c5ed08331e883b7a72da2dd
Parent:     3f6892aca5d23730a747ce88eb0b6848e7a52a2f
Author:     Mauro Carvalho Chehab <[EMAIL PROTECTED]>
AuthorDate: Tue Apr 24 13:40:07 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 15:45:56 2007 -0300

    V4L/DVB (5554): Fix: vidioc_g_parm were not zeroing the memory
    
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/videodev.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index fdfef0b..80ac5f8 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -1404,6 +1404,11 @@ static int __video_do_ioctl(struct inode *inode, struct 
file *file,
        case VIDIOC_G_PARM:
        {
                struct v4l2_streamparm *p=arg;
+               __u32 type=p->type;
+
+               memset(p,0,sizeof(*p));
+               p->type=type;
+
                if (vfd->vidioc_g_parm) {
                        ret=vfd->vidioc_g_parm(file, fh, p);
                } else {
@@ -1415,8 +1420,6 @@ static int __video_do_ioctl(struct inode *inode, struct 
file *file,
                        v4l2_video_std_construct(&s, vfd->current_norm,
                                                 
v4l2_norm_to_name(vfd->current_norm));
 
-                       memset(p,0,sizeof(*p));
-
                        p->parm.capture.timeperframe = s.frameperiod;
                        ret=0;
                }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to