@@ -201,14 +201,12 @@ static struct video_code __user *get_microcode32(struct video_code32 *kp)
up = compat_alloc_user_space(sizeof(*up));
- /*
- * NOTE! We don't actually care if these fail. If the
- * user address is invalid, the native ioctl will do
- * the error handling for us
- */
- (void) copy_to_user(up->loadwhat, kp->loadwhat, sizeof(up->loadwhat));
- (void) put_user(kp->datasize, &up->datasize);
- (void) put_user(compat_ptr(kp->data), &up->data);
+ if (copy_to_user(up->loadwhat, kp->loadwhat, sizeof(up->loadwhat)))
+ return NULL;
+ if (put_user(kp->datasize, &up->datasize))
+ return NULL;
+ if (put_user(compat_ptr(kp->data), &up->data))
+ return NULL;
return up;
}