media: videobuf2-v4l2: remove redundant error test
request_fd is validated under media_request_get_by_fd() just below this check. Thus remove it. Suggested-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Helen Koike <helen.koike@collabora.com> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Родитель
319c4bd41a
Коммит
b7da24739f
|
@ -488,11 +488,6 @@ static int vb2_queue_or_prepare_buf(struct vb2_queue *q, struct media_device *md
|
||||||
!q->ops->buf_out_validate))
|
!q->ops->buf_out_validate))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (b->request_fd < 0) {
|
|
||||||
dprintk(q, 1, "%s: request_fd < 0\n", opname);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
req = media_request_get_by_fd(mdev, b->request_fd);
|
req = media_request_get_by_fd(mdev, b->request_fd);
|
||||||
if (IS_ERR(req)) {
|
if (IS_ERR(req)) {
|
||||||
dprintk(q, 1, "%s: invalid request_fd\n", opname);
|
dprintk(q, 1, "%s: invalid request_fd\n", opname);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче