Commit f10a2585 authored by Markus Elfring's avatar Markus Elfring Committed by Linus Walleij

pinctrl: Delete unnecessary checks

The pinctrl_unregister() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 8005c49d
...@@ -638,7 +638,6 @@ static int cygnus_gpio_register_pinconf(struct cygnus_gpio *chip) ...@@ -638,7 +638,6 @@ static int cygnus_gpio_register_pinconf(struct cygnus_gpio *chip)
static void cygnus_gpio_unregister_pinconf(struct cygnus_gpio *chip) static void cygnus_gpio_unregister_pinconf(struct cygnus_gpio *chip)
{ {
if (chip->pctl)
pinctrl_unregister(chip->pctl); pinctrl_unregister(chip->pctl);
} }
......
...@@ -1484,10 +1484,7 @@ static void pcs_irq_free(struct pcs_device *pcs) ...@@ -1484,10 +1484,7 @@ static void pcs_irq_free(struct pcs_device *pcs)
static void pcs_free_resources(struct pcs_device *pcs) static void pcs_free_resources(struct pcs_device *pcs)
{ {
pcs_irq_free(pcs); pcs_irq_free(pcs);
if (pcs->pctl)
pinctrl_unregister(pcs->pctl); pinctrl_unregister(pcs->pctl);
pcs_free_funcs(pcs); pcs_free_funcs(pcs);
pcs_free_pingroups(pcs); pcs_free_pingroups(pcs);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment