Skip to content
Commit ea408316 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Walleij
Browse files

pinctrl: rza1: Remove unneeded wrong check for wrong variable



Depending on compiler version:

    drivers/pinctrl/pinctrl-rza1.c: In function ‘rza1_pinctrl_probe’:
    drivers/pinctrl/pinctrl-rza1.c:1260:5: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      if (ret)
	 ^

Indeed, the result returned by platform_get_resource() was stored in
"res", not "ret".  In addition, the correct error check would be
"if (!res)", as platform_get_resource() does not return an error code,
but returns NULL on failure.

However, as devm_ioremap_resource() verifies the validity of the passed
resource pointer anyway, the check can just be removed.

Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Fixes: 5a49b644 ("pinctrl: Renesas RZ/A1 pin and gpio controller")
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent d2a2c808
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment