summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2023-08-03 12:33:41 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-08-14 21:27:57 +0300
commit1259259f56b011d579f131c0fc39c2914e6bf628 (patch)
treebf20e47479b52101ebb5dc07845ac251bb867dc3 /drivers/media
parent9b8e6ee867a146d6a795cfb5f8ccb51f5c4953b3 (diff)
downloadlinux-1259259f56b011d579f131c0fc39c2914e6bf628.tar.xz
media: ov2680: Drop unnecessary pad checks
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 <rmfrfs@gmail.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/i2c/ov2680.c8
1 files changed, 1 insertions, 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);