Simplifies return value logic of adv7170_set_fmt().
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
{
struct v4l2_mbus_framefmt *mf = &format->format;
u8 val = adv7170_read(sd, 0x7);
- int ret = 0;
if (format->pad)
return -EINVAL;
}
if (format->which == V4L2_SUBDEV_FORMAT_ACTIVE)
- ret = adv7170_write(sd, 0x7, val);
+ return adv7170_write(sd, 0x7, val);
- return ret;
+ return 0;
}
/* ----------------------------------------------------------------------- */