From 365c551e77e7c1d2861f53f836ae4fc7b51cfcca Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 3 Mar 2023 12:46:48 +0000 Subject: [PATCH] Revert "nvmem: core: fix return value" This reverts commit e95381034519a8c5a3150f7b03f4664b1da651b2 which is commit 0c4862b1c1465e473bc961a02765490578bf5c20 upstream. It breaks the Android kernel api, and isn't even really needed in the 5.10.y kernel tree yet, as there are no users of the new field. So revert it for now. If it is needed, it can be brought back in an abi-safe way in the future. Bug: 161946584 Change-Id: I4e335c73a46ba291c790e54f40350a754ff6376b Signed-off-by: Greg Kroah-Hartman --- drivers/nvmem/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 1505c745154e..0ef7b95348b1 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -638,7 +638,6 @@ struct nvmem_device *nvmem_register(const struct nvmem_config *config) GPIOD_OUT_HIGH); if (IS_ERR(nvmem->wp_gpio)) { rval = PTR_ERR(nvmem->wp_gpio); - nvmem->wp_gpio = NULL; goto err_put_device; }