Message ID | 20200217195435.9309-5-brgl@bgdev.pl |
---|---|
State | New |
Headers | show |
Series | nvmem/gpio: fix resource management | expand |
On 17/02/2020 19:54, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bgolaszewski@baylibre.com> > > Visibly separate the GPIO request from the previous operation in the > code with a newline. > > Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> > --- Applied thanks, --srini
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 12e2991cdeef..07af9edea9cf 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -347,6 +347,7 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config) kfree(nvmem); return ERR_PTR(rval); } + if (config->wp_gpio) nvmem->wp_gpio = config->wp_gpio; else