This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: ov2680: Drop unnecessary pad checks
Author:  Hans de Goede <[email protected]>
Date:    Thu Aug 3 11:33:41 2023 +0200

Drop unnecessary pad checks in enum_mbus_code, get_fmt, set_fmt
this is already checked by check_pad() from
drivers/media/v4l2-core/v4l2-subdev.c.

Acked-by: Rui Miguel Silva <[email protected]>
Reviewed-by: Daniel Scally <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Sakari Ailus <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/i2c/ov2680.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

---

diff --git a/drivers/media/i2c/ov2680.c b/drivers/media/i2c/ov2680.c
index e6c99c14da8f..c09a0e7f7787 100644
--- a/drivers/media/i2c/ov2680.c
+++ b/drivers/media/i2c/ov2680.c
@@ -591,7 +591,7 @@ static int ov2680_enum_mbus_code(struct v4l2_subdev *sd,
 {
        struct ov2680_dev *sensor = to_ov2680_dev(sd);
 
-       if (code->pad != 0 || code->index != 0)
+       if (code->index != 0)
                return -EINVAL;
 
        code->code = sensor->mode.fmt.code;
@@ -606,9 +606,6 @@ static int ov2680_get_fmt(struct v4l2_subdev *sd,
        struct ov2680_dev *sensor = to_ov2680_dev(sd);
        struct v4l2_mbus_framefmt *fmt;
 
-       if (format->pad != 0)
-               return -EINVAL;
-
        fmt = __ov2680_get_pad_format(sensor, sd_state, format->pad,
                                      format->which);
 
@@ -629,9 +626,6 @@ static int ov2680_set_fmt(struct v4l2_subdev *sd,
        unsigned int width, height;
        int ret = 0;
 
-       if (format->pad != 0)
-               return -EINVAL;
-
        crop = __ov2680_get_pad_crop(sensor, sd_state, format->pad,
                                     format->which);
 

_______________________________________________
linuxtv-commits mailing list
[email protected]
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to