summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-ocelot.c
diff options
context:
space:
mode:
authorQinglang Miao <miaoqinglang@huawei.com>2020-09-21 16:10:57 +0300
committerLinus Walleij <linus.walleij@linaro.org>2020-09-29 16:29:24 +0300
commit17f2c8d36f8c37d230bda4d2e6e9a903f57dcd19 (patch)
tree530832c554def8b215004f6a010d670c59812f3a /drivers/pinctrl/pinctrl-ocelot.c
parent737894d2654395d88e12c196b129ea018daa4bdf (diff)
downloadlinux-17f2c8d36f8c37d230bda4d2e6e9a903f57dcd19.tar.xz
pinctrl: ocelot: simplify the return expression of ocelot_gpiochip_register()
Simplify the return expression. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Link: https://lore.kernel.org/r/20200921131057.92895-1-miaoqinglang@huawei.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-ocelot.c')
-rw-r--r--drivers/pinctrl/pinctrl-ocelot.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
index 425a3d764f00..a4a1b00f7f0d 100644
--- a/drivers/pinctrl/pinctrl-ocelot.c
+++ b/drivers/pinctrl/pinctrl-ocelot.c
@@ -1120,7 +1120,7 @@ static int ocelot_gpiochip_register(struct platform_device *pdev,
{
struct gpio_chip *gc;
struct gpio_irq_chip *girq;
- int ret, irq;
+ int irq;
info->gpio_chip = ocelot_gpiolib_chip;
@@ -1147,11 +1147,7 @@ static int ocelot_gpiochip_register(struct platform_device *pdev,
girq->handler = handle_edge_irq;
}
- ret = devm_gpiochip_add_data(&pdev->dev, gc, info);
- if (ret)
- return ret;
-
- return 0;
+ return devm_gpiochip_add_data(&pdev->dev, gc, info);
}
static const struct of_device_id ocelot_pinctrl_of_match[] = {