mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
phy: exynos-mipi-video: fix check on array index
The phys array is of size EXYNOS_MIPI_PHYS_NUM. Trying to access the
index EXYNOS_MIPI_PHYS_NUM should return an error.
Fixes: 069d2e26e9 "phy: Add driver for Exynos MIPI CSIS/DSIM DPHYs"
Signed-off-by: Antoine Ténart <[email protected]>
Signed-off-by: Kishon Vijay Abraham I <[email protected]>
This commit is contained in:
parent
fe04e4297e
commit
98c3b32229
1 changed files with 1 additions and 1 deletions
|
|
@ -101,7 +101,7 @@ static struct phy *exynos_mipi_video_phy_xlate(struct device *dev,
|
|||
{
|
||||
struct exynos_mipi_video_phy *state = dev_get_drvdata(dev);
|
||||
|
||||
if (WARN_ON(args->args[0] > EXYNOS_MIPI_PHYS_NUM))
|
||||
if (WARN_ON(args->args[0] >= EXYNOS_MIPI_PHYS_NUM))
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
return state->phys[args->args[0]].phy;
|
||||
|
|
|
|||
Loading…
Reference in a new issue