]> git.hungrycats.org Git - linux/commitdiff
[PATCH] sparse: gemtek ioctl fix
authorAlexander Viro <viro@parcelfarce.linux.theplanet.co.uk>
Tue, 13 Jul 2004 04:03:08 +0000 (21:03 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 13 Jul 2004 04:03:08 +0000 (21:03 -0700)
Dumb Typo(tm) - the first bug caught by 0/NULL checks (arg is
really a kernel pointer there, so memset() is actually OK - results
will be copied to userland by caller.  Or would be, if we would not
oops  ;-)

drivers/media/radio/radio-gemtek.c

index 3e765d66d833cf71937647057f9eba79d6b418ea..23bc25d1027dcf871df740066d36e1bc3afaac87 100644 (file)
@@ -194,7 +194,7 @@ static int gemtek_do_ioctl(struct inode *inode, struct file *file,
                }
                case VIDIOCGAUDIO:
                {       
-                       struct video_audio *v = 0;
+                       struct video_audio *v = arg;
                        memset(v,0, sizeof(*v));
                        v->flags|=VIDEO_AUDIO_MUTABLE;
                        v->volume=1;