summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-rzn1.c
diff options
context:
space:
mode:
authorPhil Edworthy <phil.edworthy@renesas.com>2018-11-23 13:54:28 +0300
committerGeert Uytterhoeven <geert+renesas@glider.be>2018-12-04 12:33:49 +0300
commit3f3327dbc5596076f94695d8d4cc66da3d5027fb (patch)
treece71679612067536ad4e92ba43a7af6190b6d22c /drivers/pinctrl/pinctrl-rzn1.c
parent8deaaa46d2de91e399076eb962b171734ca3092d (diff)
downloadlinux-3f3327dbc5596076f94695d8d4cc66da3d5027fb.tar.xz
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>
Diffstat (limited to 'drivers/pinctrl/pinctrl-rzn1.c')
-rw-r--r--drivers/pinctrl/pinctrl-rzn1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-rzn1.c b/drivers/pinctrl/pinctrl-rzn1.c
index a04235e3bec4..cc0e5aa9128a 100644
--- a/drivers/pinctrl/pinctrl-rzn1.c
+++ b/drivers/pinctrl/pinctrl-rzn1.c
@@ -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);