From: Helen Koike <helen.koike@collabora.com>
To: linux-media@vger.kernel.org
Cc: hverkuil@xs4all.nl, mchehab@kernel.org, hans.verkuil@cisco.com,
kernel@collabora.com, linux-kernel@vger.kernel.org,
tfiga@chromium.org
Subject: [PATCH 3/3] media: videobuf2-v4l2: remove redundant error test
Date: Thu, 14 Jan 2021 15:01:49 -0300 [thread overview]
Message-ID: <20210114180149.1755892-4-helen.koike@collabora.com> (raw)
In-Reply-To: <20210114180149.1755892-1-helen.koike@collabora.com>
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>
---
drivers/media/common/videobuf2/videobuf2-v4l2.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/media/common/videobuf2/videobuf2-v4l2.c b/drivers/media/common/videobuf2/videobuf2-v4l2.c
index 96d3b2b2aa31..bb642c0775d1 100644
--- a/drivers/media/common/videobuf2/videobuf2-v4l2.c
+++ b/drivers/media/common/videobuf2/videobuf2-v4l2.c
@@ -488,11 +488,6 @@ static int vb2_queue_or_prepare_buf(struct vb2_queue *q, struct media_device *md
!q->ops->buf_out_validate))
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);
if (IS_ERR(req)) {
dprintk(q, 1, "%s: invalid request_fd\n", opname);
--
2.29.2
next prev parent reply other threads:[~2021-01-14 18:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 18:01 [PATCH 0/3] v4l2 framework minor improvements Helen Koike
2021-01-14 18:01 ` [PATCH 1/3] media: v4l2-ioctl: print capabilities in v4l_print_create_buffers() Helen Koike
2021-01-14 18:01 ` [PATCH 2/3] media: videodev2.h: clarify v4l2_pix_format_mplane.sizeimage docs when to set to zero Helen Koike
2021-01-15 13:19 ` Jacopo Mondi
2021-01-16 23:21 ` Sakari Ailus
2021-01-25 9:31 ` Hans Verkuil
2021-01-25 15:02 ` Helen Koike
2021-01-14 18:01 ` Helen Koike [this message]
2021-01-16 23:22 ` [PATCH 3/3] media: videobuf2-v4l2: remove redundant error test Sakari Ailus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210114180149.1755892-4-helen.koike@collabora.com \
--to=helen.koike@collabora.com \
--cc=hans.verkuil@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=tfiga@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).