diff options
author | Hans de Goede <hdegoede@redhat.com> | 2011-06-06 15:25:18 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 17:53:42 -0300 |
commit | c246412117d871a3a90cd4e8ba2c6dea18a59f71 (patch) | |
tree | 89f6b3b1fd1769b8ca5358b281aa9a763483cefb /drivers/media/video/pwc/pwc-uncompress.c | |
parent | e7d712cc992a3f22151f15263cbacbb2d38dd371 (diff) |
[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-uncompress.c')
-rw-r--r-- | drivers/media/video/pwc/pwc-uncompress.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/media/video/pwc/pwc-uncompress.c b/drivers/media/video/pwc/pwc-uncompress.c index 3b73f295f03..4118184951e 100644 --- a/drivers/media/video/pwc/pwc-uncompress.c +++ b/drivers/media/video/pwc/pwc-uncompress.c @@ -42,12 +42,7 @@ int pwc_decompress(struct pwc_device *pdev) u16 *src; u16 *dsty, *dstu, *dstv; - if (pdev == NULL) - return -EFAULT; - fbuf = pdev->read_frame; - if (fbuf == NULL) - return -EFAULT; image = pdev->image_data; image += pdev->images[pdev->fill_image].offset; |