mbox series

[0/6] nvmem/gpio: fix resource management

Message ID 20200217195435.9309-1-brgl@bgdev.pl
Headers show
Series nvmem/gpio: fix resource management | expand

Message

Bartosz Golaszewski Feb. 17, 2020, 7:54 p.m. UTC
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

This series addresses a couple problems with memory management in nvmem
core. We fix an earlier memory leak in error path in patch 2/6. Patches
1/6, 5/6 & 6/6 add reference counting to gpio_desc structure and use it
to correctly free the write-protect GPIO. Patches 3/6 & 4/6 fix newline
problems.

Bartosz Golaszewski (5):
  gpiolib: use kref in gpio_desc
  nvmem: fix memory leak in error path
  nvmem: remove a stray newline in nvmem_register()
  nvmem: add a newline for readability
  nvmem: increase the reference count of a gpio passed over config

Khouloud Touil (1):
  nvmem: release the write-protect pin

 drivers/gpio/gpiolib.c        | 26 +++++++++++++++++++++++---
 drivers/gpio/gpiolib.h        |  1 +
 drivers/nvmem/core.c          | 14 ++++++++++----
 include/linux/gpio/consumer.h |  1 +
 4 files changed, 35 insertions(+), 7 deletions(-)

Comments

Bartosz Golaszewski Feb. 17, 2020, 7:56 p.m. UTC | #1
pon., 17 lut 2020 o 20:54 Bartosz Golaszewski <brgl@bgdev.pl> napisaƂ(a):
>
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>
> This series addresses a couple problems with memory management in nvmem
> core. We fix an earlier memory leak in error path in patch 2/6. Patches
> 1/6, 5/6 & 6/6 add reference counting to gpio_desc structure and use it
> to correctly free the write-protect GPIO. Patches 3/6 & 4/6 fix newline
> problems.
>
> Bartosz Golaszewski (5):
>   gpiolib: use kref in gpio_desc
>   nvmem: fix memory leak in error path
>   nvmem: remove a stray newline in nvmem_register()
>   nvmem: add a newline for readability
>   nvmem: increase the reference count of a gpio passed over config
>
> Khouloud Touil (1):
>   nvmem: release the write-protect pin
>
>  drivers/gpio/gpiolib.c        | 26 +++++++++++++++++++++++---
>  drivers/gpio/gpiolib.h        |  1 +
>  drivers/nvmem/core.c          | 14 ++++++++++----
>  include/linux/gpio/consumer.h |  1 +
>  4 files changed, 35 insertions(+), 7 deletions(-)
>
> --
> 2.25.0
>

Cc'ing Geert - sorry I forgot you when submitting this.

Bartosz