From e2b86b8481502f3f3039a31aa1a85b8a29e246f1 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sun, 18 Aug 2013 20:43:33 +0800 Subject: 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 --- Documentation/pinctrl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/pinctrl.txt') 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"); } -- cgit v1.2.3