From: Hans Verkuil <hans.verkuil@xxxxxxxxx> The enc_write_sg() function wrote data to the whole scatterlist instead of just 'size' bytes since 'size' was never decremented. Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx> --- drivers/staging/media/solo6x10/v4l2-enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/solo6x10/v4l2-enc.c b/drivers/staging/media/solo6x10/v4l2-enc.c index cb78ea2..32f812f 100644 --- a/drivers/staging/media/solo6x10/v4l2-enc.c +++ b/drivers/staging/media/solo6x10/v4l2-enc.c @@ -232,7 +232,7 @@ static void enc_write_sg(struct scatterlist *sglist, void *buf, int size) size_t len = sg_dma_len(sg); int i; - for (i = 0; i < len && size; i++) + for (i = 0; i < len && size; i++, size--) p[i] = *(src++); } } -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html