Message ID | 20241108142310.19794-2-isaac.scott@ideasonboard.com |
---|---|
State | New |
Headers | show |
Series | Fix Sonix Technology MJPEG streams | expand |
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c index e00f38dd07d9..2fb9f2b59afc 100644 --- a/drivers/media/usb/uvc/uvc_video.c +++ b/drivers/media/usb/uvc/uvc_video.c @@ -1117,6 +1117,7 @@ static int uvc_video_decode_start(struct uvc_streaming *stream, struct uvc_buffer *buf, const u8 *data, int len) { u8 fid; + u8 header_len = data[0]; /* * Sanity checks: @@ -1212,7 +1213,7 @@ static int uvc_video_decode_start(struct uvc_streaming *stream, stream->last_fid = fid; - return data[0]; + return header_len; } static inline enum dma_data_direction uvc_stream_dir(
The uvc_video_decode_start function returns the first byte of the header, which is in fact the length of the header. Improve readability by using an appropriately named variable. Signed-off-by: Isaac Scott <isaac.scott@ideasonboard.com> --- drivers/media/usb/uvc/uvc_video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)