mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
pinctrl: tegra-xusb: fix an off by one test
This shoudld be ">= ARRAY_SIZE()" instead of "> ARRAY_SIZE()".
Fixes: dc0a393866 ('pinctrl: Add NVIDIA Tegra XUSB pad controller support')
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Stephen Warren <[email protected]>
Acked-by: Thierry Reding <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
99e872d953
commit
8e1594db7e
1 changed files with 1 additions and 1 deletions
|
|
@ -680,7 +680,7 @@ static struct phy *tegra_xusb_padctl_xlate(struct device *dev,
|
|||
if (args->args_count <= 0)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
if (index > ARRAY_SIZE(padctl->phys))
|
||||
if (index >= ARRAY_SIZE(padctl->phys))
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
return padctl->phys[index];
|
||||
|
|
|
|||
Loading…
Reference in a new issue