Skip to content
Commit 0097ff8e authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab
Browse files

media: vb2: Enforce VB2_MAX_FRAME in vb2_core_reqbufs better



The check for the number of buffers requested against the maximum,
VB2_MAX_FRAME, was performed before checking queue's minimum number of
buffers. Reverse the order, thus ensuring that under no circumstances
num_buffers exceeds VB2_MAX_FRAME here.

Also add a warning of the condition.

Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent df93dc61
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment