summaryrefslogtreecommitdiff
path: root/scripts/include/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2025-12-09 09:53:36 +0300
committerVinod Koul <vkoul@kernel.org>2025-12-23 21:53:45 +0530
commitcabd25b57216ddc132efbcc31f972baa03aad15a (patch)
tree047e3cc3ae5480a61e80b36adc34407e93b20f66 /scripts/include/git@git.tavy.me:linux.git
parent1ca52c0983c34fca506921791202ed5bdafd5306 (diff)
phy: stm32-usphyc: Fix off by one in probe()
The "index" variable is used as an index into the usbphyc->phys[] array which has usbphyc->nphys elements. So if it is equal to usbphyc->nphys then it is one element out of bounds. The "index" comes from the device tree so it's data that we trust and it's unlikely to be wrong, however it's obviously still worth fixing the bug. Change the > to >=. Fixes: 94c358da3a05 ("phy: stm32: add support for STM32 USB PHY Controller (USBPHYC)") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://patch.msgid.link/aTfHcMJK1wFVnvEe@stanley.mountain Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'scripts/include/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions