If only one link frequency was configured, then ov7251_check_hwcfg
failed as the conditions weren't checked in the appropriate places.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
freq_found = false;
for (i = 0; i < bus_cfg.nr_of_link_frequencies; i++) {
- if (freq_found)
- break;
-
for (j = 0; j < ARRAY_SIZE(link_freq); j++)
if (bus_cfg.link_frequencies[i] == link_freq[j]) {
freq_found = true;
break;
}
+
+ if (freq_found)
+ break;
}
if (i == bus_cfg.nr_of_link_frequencies) {