Documentation: pinctrl: Fix example code for pinctrl_register
pinctrl_register() returns NULL on error, fix it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
5ffbe2e613
commit
e2b86b8481
|
@ -81,7 +81,7 @@ int __init foo_probe(void)
|
|||
struct pinctrl_dev *pctl;
|
||||
|
||||
pctl = pinctrl_register(&foo_desc, <PARENT>, NULL);
|
||||
if (IS_ERR(pctl))
|
||||
if (!pctl)
|
||||
pr_err("could not register foo pin driver\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue