From bdda068db2dbe953cfb2772eb57d05d8aa06f82d 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 63b8e4cc31fdb307d56b9dbb69fdcfe0c87d854b which is commit 0c4862b1c1465e473bc961a02765490578bf5c20 upstream. It breaks the Android kernel api, and isn't even really needed in the 5.15.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 47c1487dcf8c..6a74e3874605 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -779,7 +779,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; }