From: Axel Lin Date: Sun, 18 Aug 2013 12:43:33 +0000 (+0800) Subject: Documentation: pinctrl: Fix example code for pinctrl_register X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e2b86b8481502f3f3039a31aa1a85b8a29e246f1;p=linux-beck.git Documentation: pinctrl: Fix example code for pinctrl_register pinctrl_register() returns NULL on error, fix it. Signed-off-by: Axel Lin Signed-off-by: Linus Walleij --- diff --git a/Documentation/pinctrl.txt b/Documentation/pinctrl.txt index e7bee9bab032..c0ffd30eb55e 100644 --- a/Documentation/pinctrl.txt +++ b/Documentation/pinctrl.txt @@ -81,7 +81,7 @@ int __init foo_probe(void) struct pinctrl_dev *pctl; pctl = pinctrl_register(&foo_desc, , NULL); - if (IS_ERR(pctl)) + if (!pctl) pr_err("could not register foo pin driver\n"); }