diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-11-05 17:10:22 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-11-17 11:49:50 +0100 |
commit | f10a2585811ebd503ddf8ebcc9a32166c7b4b05f (patch) | |
tree | 4d6aa9479915881bb5d4aba32d2636477f710fd7 /drivers/pinctrl/pinctrl-single.c | |
parent | Linux 4.4-rc1 (diff) | |
download | linux-f10a2585811ebd503ddf8ebcc9a32166c7b4b05f.tar.xz linux-f10a2585811ebd503ddf8ebcc9a32166c7b4b05f.zip |
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: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-single.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-single.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c index ef04b962c3d5..d24e5f1d1525 100644 --- a/drivers/pinctrl/pinctrl-single.c +++ b/drivers/pinctrl/pinctrl-single.c @@ -1484,10 +1484,7 @@ static void pcs_irq_free(struct pcs_device *pcs) static void pcs_free_resources(struct pcs_device *pcs) { pcs_irq_free(pcs); - - if (pcs->pctl) - pinctrl_unregister(pcs->pctl); - + pinctrl_unregister(pcs->pctl); pcs_free_funcs(pcs); pcs_free_pingroups(pcs); } |