Skip to contentSkip to conversation

Documentation: pinctrl: Fix example code for pinctrl_register

PATCH In review Axel Lin 2 participants 2 messages Aug 18, 2013 – Aug 21, 2013 Documentation

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 Documentation: pinctrl: Fix example code for pinctrl_register

pinctrl_register() returns NULL on error, fix it.

---
 Documentation/pinctrl.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/pinctrl.txt +1 -1
index e7bee9b..c0ffd30 100644
@@ -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");
 }
 
Signature · 1 line
1.8.1.2