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:
Axel Lin 2013-08-18 20:43:33 +08:00 committed by Linus Walleij
parent 5ffbe2e613
commit e2b86b8481

View File

@ -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");
}