[PATCH 0/3] gpio: Failure path fixes

From: Geert Uytterhoeven
Date: Thu Mar 28 2019 - 09:13:55 EST


Hi Linus, Bartosz,

After making a silly mistake in a pin control driver, pinctrl driver
initialization failed, causing an avalanche of GPIO driver failures, and
I was greeted by the following scary messages:

OF: ERROR: Bad of_node_put() on /soc/gpio@e6050000
...
WARNING: CPU: 0 PID: 1 at lib/refcount.c:156 kobject_get+0x38/0x4c
...
WARNING: CPU: 0 PID: 1 at lib/refcount.c:190 refcount_sub_and_test_checked+0x3c/0xa8

The first two patches fix bugs in related error paths, after which the
messages are gone.
The third patch is a drive-by fix for function comment.

Thanks for your comments!

Geert Uytterhoeven (3):
gpio: of: Fix of_gpiochip_add() error path
gpio: Fix gpiochip_add_data_with_key() error path
gpio: Remove obsolete comment about gpiochip_free_hogs() usage

drivers/gpio/gpiolib-of.c | 8 +++++++-
drivers/gpio/gpiolib.c | 14 ++++++++------
2 files changed, 15 insertions(+), 7 deletions(-)

--
2.17.1

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds