Documentation: pinctrl: Fix example code for pinctrl_register
PATCH 1/1 Documentation: pinctrl: Fix example code for pinctrl_register
pinctrl_register() returns NULL on error, fix it.
Signed-off-by Axel Lin <[email protected]>
--- Documentation/pinctrl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/pinctrl.txt +1 -1
@@ -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
Quoted 3 lines · Axel Lin
pinctrl_register()returns NULL on error, fix it.Signed-off-by Axel Lin <[email protected]>
Patch applied.
Yours,
Linus Walleij