From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5755E24A067; Mon, 23 Jun 2025 13:38:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750685885; cv=none; b=iMRGzqx4cWrgAnZ9SVV9Wy72kY0A7ch30oxMSYd+lpXfxFeciX7m7RbiRdp9C2wEozH55VM9tTyaqMsJZoOfi1B6W4A/Y/F2dcP0UqhWTbrNjaWNdh1WNlcXgBXnOPaElZ+64BSW02tlC+60jYaPokqdXDsMMD5c/rl9GyM3wRE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750685885; c=relaxed/simple; bh=ExJDsfMPeYQdhiW2Ct4/Tw1BbyYyd7LDjZZ1565WiIU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pShFRt1z8gOfU5t0WovBVBbT+DP+fiqoEY0nzUnMOW2F+OQKIkYzhmHQY59xVcU4LvCKBZO5O5op3QT9Xx1HW0vxmN9orw4HqnGckT1TYiLMo/zGZL0+vn/G8gDWdmJkqce8pY3pTwB1afltuEWUZdoP3G8T2sMt7zZX39lzmmY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tsEHq7kp; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="tsEHq7kp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE37BC4CEF0; Mon, 23 Jun 2025 13:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750685885; bh=ExJDsfMPeYQdhiW2Ct4/Tw1BbyYyd7LDjZZ1565WiIU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tsEHq7kpXgJj6+p1G6+aRTw9efbZfiPh3FwyARMPPsHNSM5DZX7Rv2pY35vUzmK3c qSUE7YBPZuYXmQkiIylKbjxSGKxzvcjNty25X3cAFVYJ3ElmNRhbkFZIVxBplv4QIY DEy5JYF+/6wpHw4LU2VatYwZ5qCd4Gr0q2EmlprM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sakari Ailus , Laurent Pinchart , Hans Verkuil Subject: [PATCH 6.6 031/290] media: ccs-pll: Check for too high VT PLL multiplier in dual PLL case Date: Mon, 23 Jun 2025 15:04:52 +0200 Message-ID: <20250623130627.933055409@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250623130626.910356556@linuxfoundation.org> References: <20250623130626.910356556@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sakari Ailus commit 6868b955acd6e5d7405a2b730c2ffb692ad50d2c upstream. The check for VT PLL upper limit in dual PLL case was missing. Add it now. Fixes: 6c7469e46b60 ("media: ccs-pll: Add trivial dual PLL support") Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Greg Kroah-Hartman --- drivers/media/i2c/ccs-pll.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/media/i2c/ccs-pll.c +++ b/drivers/media/i2c/ccs-pll.c @@ -312,6 +312,11 @@ __ccs_pll_calculate_vt_tree(struct devic dev_dbg(dev, "more_mul2: %u\n", more_mul); pll_fr->pll_multiplier = mul * more_mul; + if (pll_fr->pll_multiplier > lim_fr->max_pll_multiplier) { + dev_dbg(dev, "pll multiplier %u too high\n", + pll_fr->pll_multiplier); + return -EINVAL; + } if (pll_fr->pll_multiplier * pll_fr->pll_ip_clk_freq_hz > lim_fr->max_pll_op_clk_freq_hz)