v4l2_cap: fix reqbuf return error when set count = 0.

Return success when reqbuf count is zero.


Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
This commit is contained in:
yaojingwei
2025-11-19 19:53:07 +08:00
committed by Matteo Golin
parent 84bcb12fff
commit 24a18d33af
+5
View File
@@ -2180,6 +2180,11 @@ static int capture_reqbufs(FAR struct file *filep,
return -EINVAL;
}
if (reqbufs->count == 0)
{
return 0;
}
imgdata = cmng->imgdata;
type_inf = get_capture_type_inf(cmng, reqbufs->type);
if (type_inf == NULL)