diff options
Diffstat (limited to 'drivers/pinctrl/pinctrl-as3722.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-as3722.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/pinctrl/pinctrl-as3722.c b/drivers/pinctrl/pinctrl-as3722.c index c862f9c0e9ce..0e4ec91f4d49 100644 --- a/drivers/pinctrl/pinctrl-as3722.c +++ b/drivers/pinctrl/pinctrl-as3722.c | |||
@@ -565,7 +565,6 @@ static int as3722_pinctrl_probe(struct platform_device *pdev) | |||
565 | { | 565 | { |
566 | struct as3722_pctrl_info *as_pci; | 566 | struct as3722_pctrl_info *as_pci; |
567 | int ret; | 567 | int ret; |
568 | int tret; | ||
569 | 568 | ||
570 | as_pci = devm_kzalloc(&pdev->dev, sizeof(*as_pci), GFP_KERNEL); | 569 | as_pci = devm_kzalloc(&pdev->dev, sizeof(*as_pci), GFP_KERNEL); |
571 | if (!as_pci) | 570 | if (!as_pci) |
@@ -611,10 +610,7 @@ static int as3722_pinctrl_probe(struct platform_device *pdev) | |||
611 | return 0; | 610 | return 0; |
612 | 611 | ||
613 | fail_range_add: | 612 | fail_range_add: |
614 | tret = gpiochip_remove(&as_pci->gpio_chip); | 613 | gpiochip_remove(&as_pci->gpio_chip); |
615 | if (tret < 0) | ||
616 | dev_warn(&pdev->dev, "Couldn't remove gpio chip, %d\n", tret); | ||
617 | |||
618 | fail_chip_add: | 614 | fail_chip_add: |
619 | pinctrl_unregister(as_pci->pctl); | 615 | pinctrl_unregister(as_pci->pctl); |
620 | return ret; | 616 | return ret; |
@@ -623,11 +619,8 @@ fail_chip_add: | |||
623 | static int as3722_pinctrl_remove(struct platform_device *pdev) | 619 | static int as3722_pinctrl_remove(struct platform_device *pdev) |
624 | { | 620 | { |
625 | struct as3722_pctrl_info *as_pci = platform_get_drvdata(pdev); | 621 | struct as3722_pctrl_info *as_pci = platform_get_drvdata(pdev); |
626 | int ret; | ||
627 | 622 | ||
628 | ret = gpiochip_remove(&as_pci->gpio_chip); | 623 | gpiochip_remove(&as_pci->gpio_chip); |
629 | if (ret < 0) | ||
630 | return ret; | ||
631 | pinctrl_unregister(as_pci->pctl); | 624 | pinctrl_unregister(as_pci->pctl); |
632 | return 0; | 625 | return 0; |
633 | } | 626 | } |