mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 12:43:55 +08:00
[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>
This commit is contained in:
parent
a0f7fe5b14
commit
599bc36a79
@ -951,15 +951,9 @@ static long pvr2_v4l2_ioctl(struct file *file,
|
||||
if (ret < 0) {
|
||||
if (pvrusb2_debug & PVR2_TRACE_V4LIOCTL) {
|
||||
pvr2_trace(PVR2_TRACE_V4LIOCTL,
|
||||
"pvr2_v4l2_do_ioctl failure, ret=%ld", ret);
|
||||
} else {
|
||||
if (pvrusb2_debug & PVR2_TRACE_V4LIOCTL) {
|
||||
pvr2_trace(PVR2_TRACE_V4LIOCTL,
|
||||
"pvr2_v4l2_do_ioctl failure, ret=%ld"
|
||||
" command was:", ret);
|
||||
v4l_printk_ioctl(pvr2_hdw_get_driver_name(hdw),
|
||||
cmd);
|
||||
}
|
||||
"pvr2_v4l2_do_ioctl failure, ret=%ld"
|
||||
" command was:", ret);
|
||||
v4l_printk_ioctl(pvr2_hdw_get_driver_name(hdw), cmd);
|
||||
}
|
||||
} else {
|
||||
pvr2_trace(PVR2_TRACE_V4LIOCTL,
|
||||
|
Loading…
Reference in New Issue
Block a user