diff mbox series

docs: pin-control: Fix error path for control state example

Message ID 20210328164222.720525-1-niklas.soderlund+renesas@ragnatech.se
State New
Headers show
Series docs: pin-control: Fix error path for control state example | expand

Commit Message

Niklas Söderlund March 28, 2021, 4:42 p.m. UTC
The error is constructed using the wrong variable.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 Documentation/driver-api/pin-control.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Linus Walleij April 8, 2021, 2:03 p.m. UTC | #1
On Sun, Mar 28, 2021 at 6:42 PM Niklas Söderlund
<niklas.soderlund+renesas@ragnatech.se> wrote:

> The error is constructed using the wrong variable.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Patch applied!

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/Documentation/driver-api/pin-control.rst b/Documentation/driver-api/pin-control.rst
index c905b273e8331e8a..e2474425fb0c2ba6 100644
--- a/Documentation/driver-api/pin-control.rst
+++ b/Documentation/driver-api/pin-control.rst
@@ -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);