diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-11-05 19:10:22 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-11-17 13:49:50 +0300 |
commit | f10a2585811ebd503ddf8ebcc9a32166c7b4b05f (patch) | |
tree | 4d6aa9479915881bb5d4aba32d2636477f710fd7 /drivers/pinctrl/bcm | |
parent | 8005c49d9aea74d382f474ce11afbbc7d7130bec (diff) | |
download | linux-f10a2585811ebd503ddf8ebcc9a32166c7b4b05f.tar.xz |
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/bcm')
-rw-r--r-- | drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c b/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c index 12a48f498b75..663ad0a34674 100644 --- a/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c +++ b/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c @@ -638,8 +638,7 @@ static int cygnus_gpio_register_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); } struct cygnus_gpio_data { |