]> Pileus Git - ~andy/linux/commitdiff
Documentation: pinctrl: Fix example code for pinctrl_register
authorAxel Lin <axel.lin@ingics.com>
Sun, 18 Aug 2013 12:43:33 +0000 (20:43 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 23 Aug 2013 06:56:28 +0000 (08:56 +0200)
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>
Documentation/pinctrl.txt

index e7bee9bab0325296370f21669bf587c02baf1ca4..c0ffd30eb55eae219cc9a6606ea5b3b71cf01f63 100644 (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");
 }