Commit 3f3327db authored by Phil Edworthy's avatar Phil Edworthy Committed by Geert Uytterhoeven

pinctrl: rzn1: Fix of_get_child_count() error check

If we assign the result of of_get_child_count() to an unsigned int,
the code will not detect any errors. Therefore assign it to an int
instead.
Signed-off-by: default avatarPhil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
parent 8deaaa46
...@@ -810,8 +810,8 @@ static int rzn1_pinctrl_probe_dt(struct platform_device *pdev, ...@@ -810,8 +810,8 @@ static int rzn1_pinctrl_probe_dt(struct platform_device *pdev,
struct device_node *np = pdev->dev.of_node; struct device_node *np = pdev->dev.of_node;
struct device_node *child; struct device_node *child;
unsigned int maxgroups = 0; unsigned int maxgroups = 0;
unsigned int nfuncs = 0;
unsigned int i = 0; unsigned int i = 0;
int nfuncs = 0;
int ret; int ret;
nfuncs = of_get_child_count(np); nfuncs = of_get_child_count(np);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment