Skip to content

Commit 1259259

Browse files
jwrdegoedemchehab
authored andcommitted
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 <[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]>
1 parent 9b8e6ee commit 1259259

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

drivers/media/i2c/ov2680.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ static int ov2680_enum_mbus_code(struct v4l2_subdev *sd,
591591
{
592592
struct ov2680_dev *sensor = to_ov2680_dev(sd);
593593

594-
if (code->pad != 0 || code->index != 0)
594+
if (code->index != 0)
595595
return -EINVAL;
596596

597597
code->code = sensor->mode.fmt.code;
@@ -606,9 +606,6 @@ static int ov2680_get_fmt(struct v4l2_subdev *sd,
606606
struct ov2680_dev *sensor = to_ov2680_dev(sd);
607607
struct v4l2_mbus_framefmt *fmt;
608608

609-
if (format->pad != 0)
610-
return -EINVAL;
611-
612609
fmt = __ov2680_get_pad_format(sensor, sd_state, format->pad,
613610
format->which);
614611

@@ -629,9 +626,6 @@ static int ov2680_set_fmt(struct v4l2_subdev *sd,
629626
unsigned int width, height;
630627
int ret = 0;
631628

632-
if (format->pad != 0)
633-
return -EINVAL;
634-
635629
crop = __ov2680_get_pad_crop(sensor, sd_state, format->pad,
636630
format->which);
637631

0 commit comments

Comments
 (0)