mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
737894d265
commit
17f2c8d36f
|
@ -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[] = {
|
||||
|
|
Loading…
Reference in New Issue