int fvco_min, fvco_max, delta, best_delta; /* all in khz */
/* Early checks preventing division by 0 & odd results */
- if ((clkin_khz <= 0) || (clkout_khz <= 0))
+ if (clkin_khz <= 0 || clkout_khz <= 0)
return -EINVAL;
fvco_min = LANE_MIN_KBPS * 2 * ODF_MAX;
for (o = ODF_MIN; o <= ODF_MAX; o *= 2) {
n = DIV_ROUND_CLOSEST(i * o * clkout_khz, clkin_khz);
/* Check ndiv according to vco range */
- if ((n < n_min) || (n > n_max))
+ if (n < n_min || n > n_max)
continue;
/* Check if new delta is better & saves parameters */
delta = dsi_pll_get_clkout_khz(clkin_khz, i, n, o) -
src_h = state->src_h >> 16;
/* Reject scaling */
- if ((src_w != state->crtc_w) || (src_h != state->crtc_h)) {
+ if (src_w != state->crtc_w || src_h != state->crtc_h) {
DRM_ERROR("Scaling is not supported");
return -EINVAL;
}