Commit 02f23aa4 authored by Minghao Chi's avatar Minghao Chi Committed by Linus Walleij

drivers/pinctrl: remove redundant ret variable

Return value from pxa2xx_pinctrl_init() directly instead
of taking this in another redundant variable.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: default avatarCGEL ZTE <cgel.zte@gmail.com>
Link: https://lore.kernel.org/r/20220110012730.643927-1-chi.minghao@zte.com.cnSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent e783362e
...@@ -504,7 +504,7 @@ static const struct pxa_desc_pin pxa27x_pins[] = { ...@@ -504,7 +504,7 @@ static const struct pxa_desc_pin pxa27x_pins[] = {
static int pxa27x_pinctrl_probe(struct platform_device *pdev) static int pxa27x_pinctrl_probe(struct platform_device *pdev)
{ {
int ret, i; int i;
void __iomem *base_af[8]; void __iomem *base_af[8];
void __iomem *base_dir[4]; void __iomem *base_dir[4];
void __iomem *base_sleep[4]; void __iomem *base_sleep[4];
...@@ -532,9 +532,8 @@ static int pxa27x_pinctrl_probe(struct platform_device *pdev) ...@@ -532,9 +532,8 @@ static int pxa27x_pinctrl_probe(struct platform_device *pdev)
for (i = 0; i < ARRAY_SIZE(base_sleep); i++) for (i = 0; i < ARRAY_SIZE(base_sleep); i++)
base_sleep[i] = base_sleep[0] + sizeof(base_af[0]) * i; base_sleep[i] = base_sleep[0] + sizeof(base_af[0]) * i;
ret = pxa2xx_pinctrl_init(pdev, pxa27x_pins, ARRAY_SIZE(pxa27x_pins), return pxa2xx_pinctrl_init(pdev, pxa27x_pins, ARRAY_SIZE(pxa27x_pins),
base_af, base_dir, base_sleep); base_af, base_dir, base_sleep);
return ret;
} }
static const struct of_device_id pxa27x_pinctrl_match[] = { static const struct of_device_id pxa27x_pinctrl_match[] = {
......
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