[media] media: pvrusb2: make logging code sane
authorAndrey Utkin <andrey.krieger.utkin@gmail.com>
Thu, 10 Jul 2014 12:32:25 +0000 (09:32 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 17 Jul 2014 23:05:38 +0000 (20:05 -0300)
commit599bc36a79dc03c18360d9b5bc08c18a6dde323e
tree24519d0f3cb9b4e6beb399971aa1042c1cbebe20
parenta0f7fe5b14b4c031810aae06a9cbcee3bea00a65
[media] media: pvrusb2: make logging code sane

The issue was discovered by static analysis. It turns out that code is
somewhat insane, being
if (x) {...} else { if (x) {...} }

Edited it to do the only reasonable thing, which is to log the
information about the failed call. The most descriptive logging commands
set is taken from original code.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=79801

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Acked-by: Mike Isely <isely@pobox.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/pvrusb2/pvrusb2-v4l2.c