Commit e2b86b84 authored by Axel Lin's avatar Axel Lin Committed by Linus Walleij

Documentation: pinctrl: Fix example code for pinctrl_register

pinctrl_register() returns NULL on error, fix it.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 5ffbe2e6
......@@ -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");
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment