diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2017-04-03 08:25:32 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-04-10 07:41:27 -0300 |
commit | 360a3a90c6261fe24a959ff38f8f6c3a8468f23c (patch) | |
tree | b65469d666c159c8dfb994dc9c3d2de92cb1b772 /drivers/media/usb/uvc/uvc_video.c | |
parent | f098268bd68b7bf1ec814ea2bf0d05c7505b8e43 (diff) | |
download | linux-360a3a90c6261fe24a959ff38f8f6c3a8468f23c.tar.bz2 |
[media] uvcvideo: Fix empty packet statistic
The frame counters are inadvertently counting packets with content as
empty.
Fix it by correcting the logic expression
Fixes: 7bc5edb00bbd [media] uvcvideo: Extract video stream statistics
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb/uvc/uvc_video.c')
-rw-r--r-- | drivers/media/usb/uvc/uvc_video.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c index 07a6c833ef7b..128c0a7826ce 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c @@ -818,7 +818,7 @@ static void uvc_video_stats_decode(struct uvc_streaming *stream, /* Update the packets counters. */ stream->stats.frame.nb_packets++; - if (len > header_size) + if (len <= header_size) stream->stats.frame.nb_empty++; if (data[1] & UVC_STREAM_ERR) |