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: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
This commit is contained in:
Phil Edworthy 2018-11-23 10:54:28 +00:00 committed by Geert Uytterhoeven
parent 8deaaa46d2
commit 3f3327dbc5

View file

@ -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 *child;
unsigned int maxgroups = 0;
unsigned int nfuncs = 0;
unsigned int i = 0;
int nfuncs = 0;
int ret;
nfuncs = of_get_child_count(np);