From 6a3643ed3d8bfa46dea8a42df7840f40a6886dae Mon Sep 17 00:00:00 2001 From: Alexander Viro Date: Mon, 12 Jul 2004 21:03:08 -0700 Subject: [PATCH] [PATCH] sparse: gemtek ioctl fix 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/radio/radio-gemtek.c b/drivers/media/radio/radio-gemtek.c index 3e765d66d833c..23bc25d1027dc 100644 --- a/drivers/media/radio/radio-gemtek.c +++ b/drivers/media/radio/radio-gemtek.c @@ -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; -- 2.53.0