Use macro min_t to get the minimum of two values for readability.
Signed-off-by: Narcisa Ana Maria Vasile <narcisaanamaria12@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
pr_info("Failed to get camera info\n");
}
for (i = 0;
- i < (cam_info.num_cameras > num_resolutions ?
- num_resolutions :
- cam_info.num_cameras);
+ i < min_t(unsigned int, cam_info.num_cameras, num_resolutions);
i++) {
resolutions[i][0] = cam_info.cameras[i].max_width;
resolutions[i][1] = cam_info.cameras[i].max_height;