]> git.baikalelectronics.ru Git - kernel.git/commit
[media] pwc: Remove a bunch of bogus sanity checks / don't return EFAULT wrongly
authorHans de Goede <hdegoede@redhat.com>
Mon, 6 Jun 2011 18:25:18 +0000 (15:25 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 27 Jul 2011 20:53:42 +0000 (17:53 -0300)
commitb9abf5b4f047adff1e84a48946c11920ef737b8f
tree89f6b3b1fd1769b8ca5358b281aa9a763483cefb
parent5d84f9c70c7985d9ff1b309d79afae157e95cbb6
[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>
drivers/media/video/pwc/pwc-if.c
drivers/media/video/pwc/pwc-uncompress.c
drivers/media/video/pwc/pwc-v4l.c