Re: [RFCv4 PATCH 08/11] vb2: q-num_buffers was updated too soon

2014-02-23 Thread Hans Verkuil
On 02/14/2014 11:41 AM, Hans Verkuil wrote: From: Hans Verkuil hans.verk...@cisco.com In __reqbufs() and __create_bufs() the q-num_buffers field was updated with the number of newly allocated buffers, but right after that those are freed again if some error had occurred before. Move the line

[RFCv4 PATCH 08/11] vb2: q-num_buffers was updated too soon

2014-02-14 Thread Hans Verkuil
From: Hans Verkuil hans.verk...@cisco.com In __reqbufs() and __create_bufs() the q-num_buffers field was updated with the number of newly allocated buffers, but right after that those are freed again if some error had occurred before. Move the line updating num_buffers to *after* that error