backlight: qcom-wled: Validate enabled string indices in DT
authorMarijn Suijten <marijn.suijten@somainline.org>
Mon, 15 Nov 2021 20:34:51 +0000 (21:34 +0100)
committerLee Jones <lee.jones@linaro.org>
Wed, 22 Dec 2021 11:14:46 +0000 (11:14 +0000)
commitc05b21ebc5bce3ecc78c2c71afd76d92c790a2ac
treee86e44ce98ad925f6a4f532000239530249acc9e
parent6202b5de73cfb0d83245b8ea834017183ec67885
backlight: qcom-wled: Validate enabled string indices in DT

The strings passed in DT may possibly cause out-of-bounds register
accesses and should be validated before use.

Fixes: 775d2ffb4af6 ("backlight: qcom-wled: Restructure the driver for WLED3")
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20211115203459.1634079-2-marijn.suijten@somainline.org
drivers/video/backlight/qcom-wled.c