]> git.baikalelectronics.ru Git - kernel.git/commit
media: v4l: vsp1: Release buffers in start_streaming error path
authorKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Fri, 4 Aug 2017 16:32:38 +0000 (12:32 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Sun, 20 Aug 2017 13:29:19 +0000 (09:29 -0400)
commit51d09d1d71980fba7428ee3903945005ead5a2c4
tree97627c51e7dec13356c27fcfe3f05e91961e69a9
parent3e7e389db949b50a925519df3c54c6422640c30b
media: v4l: vsp1: Release buffers in start_streaming error path

Presently any received buffers are only released back to vb2 if
vsp1_video_stop_streaming() is called. If vsp1_video_start_streaming()
encounters an error, we will be warned by the vb2 handlers that buffers
have not been returned.

Move the buffer cleanup code to its own function to prevent duplication
and call from both vsp1_video_stop_streaming() and the error path in
vsp1_video_start_streaming().

Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/vsp1/vsp1_video.c