Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/pinctrl: remove redundant ret variable

Return value from pxa2xx_pinctrl_init() directly instead
of taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
Link: https://lore.kernel.org/r/20220110012730.643927-1-chi.minghao@zte.com.cn
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Minghao Chi and committed by
Linus Walleij
02f23aa4 e783362e

+2 -3
+2 -3
drivers/pinctrl/pxa/pinctrl-pxa27x.c
··· 504 504 505 505 static int pxa27x_pinctrl_probe(struct platform_device *pdev) 506 506 { 507 - int ret, i; 507 + int i; 508 508 void __iomem *base_af[8]; 509 509 void __iomem *base_dir[4]; 510 510 void __iomem *base_sleep[4]; ··· 532 532 for (i = 0; i < ARRAY_SIZE(base_sleep); i++) 533 533 base_sleep[i] = base_sleep[0] + sizeof(base_af[0]) * i; 534 534 535 - ret = pxa2xx_pinctrl_init(pdev, pxa27x_pins, ARRAY_SIZE(pxa27x_pins), 535 + return pxa2xx_pinctrl_init(pdev, pxa27x_pins, ARRAY_SIZE(pxa27x_pins), 536 536 base_af, base_dir, base_sleep); 537 - return ret; 538 537 } 539 538 540 539 static const struct of_device_id pxa27x_pinctrl_match[] = {