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>
This commit is contained in:

committed by
Linus Walleij

parent
8005c49d9a
commit
f10a258581
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user