Remove unneeded buffer type checks from FMT IOTCL handlers. Checks
are already done by V4L core.

Signed-off-by: Antti Palosaari <cr...@iki.fi>
---
 drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c 
b/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
index 0bc417d..d101409 100644
--- a/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
+++ b/drivers/staging/media/rtl2832u_sdr/rtl2832_sdr.c
@@ -1191,9 +1191,6 @@ static int rtl2832_sdr_g_fmt_sdr_cap(struct file *file, 
void *priv,
        struct rtl2832_sdr_state *s = video_drvdata(file);
        dev_dbg(&s->udev->dev, "%s:\n", __func__);
 
-       if (f->type != V4L2_BUF_TYPE_SDR_CAPTURE)
-               return -EINVAL;
-
        f->fmt.sdr.pixelformat = s->pixelformat;
 
        return 0;
@@ -1208,9 +1205,6 @@ static int rtl2832_sdr_s_fmt_sdr_cap(struct file *file, 
void *priv,
        dev_dbg(&s->udev->dev, "%s: pixelformat fourcc %4.4s\n", __func__,
                        (char *)&f->fmt.sdr.pixelformat);
 
-       if (f->type != V4L2_BUF_TYPE_SDR_CAPTURE)
-               return -EINVAL;
-
        if (vb2_is_busy(q))
                return -EBUSY;
 
@@ -1235,9 +1229,6 @@ static int rtl2832_sdr_try_fmt_sdr_cap(struct file *file, 
void *priv,
        dev_dbg(&s->udev->dev, "%s: pixelformat fourcc %4.4s\n", __func__,
                        (char *)&f->fmt.sdr.pixelformat);
 
-       if (f->type != V4L2_BUF_TYPE_SDR_CAPTURE)
-               return -EINVAL;
-
        for (i = 0; i < NUM_FORMATS; i++) {
                if (formats[i].pixelformat == f->fmt.sdr.pixelformat)
                        return 0;
-- 
1.8.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to