summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2016-09-21 15:07:39 +0000
committerLinus Walleij <linus.walleij@linaro.org>2016-09-23 15:10:00 +0200
commit6e643d8ddf0e923ea0601e1dc014ff0d3b7b8260 (patch)
tree50ca199bc529488691381c3dda2c01fed5807b63
parent22a5db98a30ea734c29056b0d59cb4fe2a383bc2 (diff)
downloadblackbird-op-linux-6e643d8ddf0e923ea0601e1dc014ff0d3b7b8260.tar.gz
blackbird-op-linux-6e643d8ddf0e923ea0601e1dc014ff0d3b7b8260.zip
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>
-rw-r--r--drivers/gpio/gpio-loongson1.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-loongson1.c b/drivers/gpio/gpio-loongson1.c
index ad0a5958fcd0..72b64039241a 100644
--- a/drivers/gpio/gpio-loongson1.c
+++ b/drivers/gpio/gpio-loongson1.c
@@ -56,11 +56,6 @@ static int ls1x_gpio_probe(struct platform_device *pdev)
return -ENOMEM;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(dev, "failed to get I/O memory\n");
- return -EINVAL;
- }
-
gpio_reg_base = devm_ioremap_resource(dev, res);
if (IS_ERR(gpio_reg_base))
return PTR_ERR(gpio_reg_base);
OpenPOWER on IntegriCloud