diff options
author | Hans de Goede <hdegoede@redhat.com> | 2011-06-06 20:25:18 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 22:53:42 +0200 |
commit | c246412117d871a3a90cd4e8ba2c6dea18a59f71 (patch) | |
tree | 89f6b3b1fd1769b8ca5358b281aa9a763483cefb /drivers/media/video/pwc/pwc-v4l.c | |
parent | [media] gspca: s/strncpy/strlcpy/ (diff) | |
download | linux-c246412117d871a3a90cd4e8ba2c6dea18a59f71.tar.xz linux-c246412117d871a3a90cd4e8ba2c6dea18a59f71.zip |
[media] pwc: Remove a bunch of bogus sanity checks / don't return EFAULT wrongly
The chances if any of these becoming NULL magically are 0% And if they
do become NULL oopsing is the right thing to do (so that the user logs a
bug with the kernel rather then with whatever app he was using).
Returning EFAULT to userspace should only be done when userspace supplies
a bad address, not on driver bugs / hw issues, so in the few cases where the
check is not bogus return something else.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pwc/pwc-v4l.c')
-rw-r--r-- | drivers/media/video/pwc/pwc-v4l.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/pwc/pwc-v4l.c b/drivers/media/video/pwc/pwc-v4l.c index 059bd95c1225..8e72e0f56550 100644 --- a/drivers/media/video/pwc/pwc-v4l.c +++ b/drivers/media/video/pwc/pwc-v4l.c @@ -778,7 +778,7 @@ static int pwc_dqbuf(struct file *file, void *fh, struct v4l2_buffer *buf) /* Decompress data in pdev->images[pdev->fill_image] */ ret = pwc_handle_frame(pdev); if (ret) - return -EFAULT; + return ret; PWC_DEBUG_IOCTL("VIDIOC_DQBUF: after pwc_handle_frame\n"); buf->index = pdev->fill_image; |