From: Kieran Bingham Date: Mon, 3 Apr 2017 11:25:32 +0000 (-0300) Subject: [media] uvcvideo: Fix empty packet statistic X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=360a3a90c6261fe24a959ff38f8f6c3a8468f23c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- 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)