docs: pin-control: Fix error path for control state example
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Sun, 28 Mar 2021 16:42:22 +0000 (18:42 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 8 Apr 2021 14:02:43 +0000 (16:02 +0200)
The error is constructed using the wrong variable.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/20210328164222.720525-1-niklas.soderlund+renesas@ragnatech.se
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Documentation/driver-api/pin-control.rst

index c905b27..e247442 100644 (file)
@@ -1235,7 +1235,7 @@ default state like this::
                foo->s = pinctrl_lookup_state(foo->p, PINCTRL_STATE_DEFAULT);
                if (IS_ERR(foo->s)) {
                        /* FIXME: clean up "foo" here */
-                       return PTR_ERR(s);
+                       return PTR_ERR(foo->s);
                }
 
                ret = pinctrl_select_state(foo->s);