On Tue, Jun 27, 2023 at 05:08:39PM +0200, Jacopo Mondi wrote: > On Tue, Jun 27, 2023 at 03:18:08PM +0200, Hans de Goede wrote: ... > > mode = v4l2_find_nearest_size(ov2680_mode_data, > > - ARRAY_SIZE(ov2680_mode_data), width, > > - height, fmt->width, fmt->height); > > + ARRAY_SIZE(ov2680_mode_data), > > + width, height, > > + format->format.width, > > + format->format.height); > > if (!mode) > > return -EINVAL; > > Nit: only if you have to resend, could this be dropped? mode will be NULL > only if ov2680_mode_data[] has no entries. We shouldn't rely on the implementation details of some API if it's not advertised that way. Even if it is, the robustness of the code is better with this check. -- With Best Regards, Andy Shevchenko