diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-06-04 08:31:42 -0700 |
|---|---|---|
| committer | David Mosberger <davidm@tiger.hpl.hp.com> | 2003-06-04 08:31:42 -0700 |
| commit | 2cb28602fb6124ba0b07cd40e95d3fff8cad4330 (patch) | |
| tree | cd774cbe3dd38ea3ee7a4b2e693772d6db8463e1 | |
| parent | 1b3b38f881cca9d19cf58f0f11d731b8d9dabe74 (diff) | |
[PATCH] radio-cadet.c: remove unnecessary copy_to_user()
From: Hollis Blanchard <hollisb@us.ibm.com>
As pointed out by the Stanford checker, 'v' is not tainted. The driver
shouldn't be using copy_to_user() in cadet_do_ioctl() at all:
cadet_do_ioctl() is being called by drivers/media/video/videodev.c:
video_usercopy(), which has already copied the buffer 'arg' (aka 'v')
into kernel space, and will copy it back after cadet_do_ioctl()
returns. So all the direct 'v' accesses are correct.
| -rw-r--r-- | drivers/media/radio/radio-cadet.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c index 68f21790076f..fd3f10015c92 100644 --- a/drivers/media/radio/radio-cadet.c +++ b/drivers/media/radio/radio-cadet.c @@ -389,9 +389,6 @@ static int cadet_do_ioctl(struct inode *inode, struct file *file, v->flags|=VIDEO_TUNER_STEREO_ON; } v->flags|=cadet_getrds(); - if(copy_to_user(arg,&v, sizeof(v))) { - return -EFAULT; - } break; case 1: strcpy(v->name,"AM"); @@ -402,9 +399,6 @@ static int cadet_do_ioctl(struct inode *inode, struct file *file, v->mode=0; v->mode|=VIDEO_MODE_AUTO; v->signal=sigstrength; - if(copy_to_user(arg,&v, sizeof(v))) { - return -EFAULT; - } break; } return 0; |
