5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Pengpeng Hou [ Upstream commit 444b7116e7ef1fdb5f7db3bc1f74b20098d062d4 ] The sil,i2s-data-lanes property reader bounds the number of entries, but does not bound each entry's value. Those values index the four-entry i2s_lane_id table when the audio FIFO sequence is built. Reject unsupported lane values before indexing that table. Report the property name and invalid value with dev_err_probe() so the diagnostic identifies the faulty configuration. The issue was found by our static-analysis tool. Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Reviewed-by: Luca Ceresoli Link: https://patch.msgid.link/20260920034833.18874-1-hppiscas@163.com Signed-off-by: Luca Ceresoli Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/sii902x.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c index 89558e5815303..91c627ff6d6e2 100644 --- a/drivers/gpu/drm/bridge/sii902x.c +++ b/drivers/gpu/drm/bridge/sii902x.c @@ -781,9 +781,15 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x, } codec_data.max_i2s_channels = 2 * num_lanes; - for (i = 0; i < num_lanes; i++) + for (i = 0; i < num_lanes; i++) { + if (lanes[i] >= ARRAY_SIZE(i2s_lane_id)) + return dev_err_probe(dev, -EINVAL, + "invalid sil,i2s-data-lanes value %u\n", + lanes[i]); + sii902x->audio.i2s_fifo_sequence[i] |= audio_fifo_id[i] | i2s_lane_id[lanes[i]] | SII902X_TPI_I2S_FIFO_ENABLE; + } sii902x->audio.mclk = devm_clk_get_optional(dev, "mclk"); if (IS_ERR(sii902x->audio.mclk)) { -- 2.53.0