Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0498152 authored by Quentin Schulz's avatar Quentin Schulz Committed by Linus Walleij
Browse files

pinctrl: axp209: dereference pointer after it's been set



The number of GPIOs is gotten from a field within the structure
referenced in the of_device.data but it was actually read before it was
retrieved, thus it was dereferencing a null pointer.

Set the number of GPIOs after retrieving of_device.data.

Fixes: e1190083 ("pinctrl: axp209: add support for AXP813 GPIOs")
Signed-off-by: default avatarQuentin Schulz <quentin.schulz@free-electrons.com>
Reported-by: default avatarMylène Josserand <mylene.josserand@free-electrons.com>
Tested-by: default avatarMylène Josserand <mylene.josserand@free-electrons.com>
Acked-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 5c9d8c4f
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