Browse Source

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>
Axel Lin 12 years ago
parent
commit
e2b86b8481
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Documentation/pinctrl.txt

+ 1 - 1
Documentation/pinctrl.txt

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