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

gpio: loongson1: remove redundant return value check

Remove unneeded error handling on the result of a call
to platform_get_resource() when the value is passed to
devm_ioremap_resource().

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Wei Yongjun and committed by
Linus Walleij
6e643d8d 22a5db98

-5
-5
drivers/gpio/gpio-loongson1.c
··· 56 56 return -ENOMEM; 57 57 58 58 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 59 - if (!res) { 60 - dev_err(dev, "failed to get I/O memory\n"); 61 - return -EINVAL; 62 - } 63 - 64 59 gpio_reg_base = devm_ioremap_resource(dev, res); 65 60 if (IS_ERR(gpio_reg_base)) 66 61 return PTR_ERR(gpio_reg_base);