Skip to content
Commit 9b9448f3 authored by Drew Fustini's avatar Drew Fustini Committed by Linus Walleij
Browse files

pinctrl: single: fix pinctrl_spec.args_count bounds check



The property #pinctrl-cells can either be 1 or 2:

- if #pinctrl-cells = <1>, then pinctrl_spec.args_count = 2
- if #pinctrl-cells = <2>, then pinctrl_spec.args_count = 3

All other values of pinctrl_spec.args_count are incorrect.  This fix
checks the upper bound instead of just the lower bound.

Fixes: a1339541 ("pinctrl: single: parse #pinctrl-cells = 2")
Reported-by: default avatarTrent Piepho <tpiepho@gmail.com>
Signed-off-by: default avatarDrew Fustini <drew@beagleboard.org>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/linux-omap/3139716.CMS8C0sQ7x@zen.local/
Link: https://lore.kernel.org/r/20200930174839.1308344-1-drew@beagleboard.org


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent a0cec28c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment