From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796258071; b=gdmvgxeFg06ZAcFsmmF1PE66ScLIzXkXlqPmy3iU9Pybn7SK/+dvmL92s/bh0cirb3P3 72gmKmpvMkA+3eQh3ZSwu5DrPcnHPMy1v3XxGfBJL8vPlJeXzusF2tPP9WABcLfJJAjGG jJSKhaZgUchgN3a0grE88r4QRVQB5mzFJE6Vn2FIIQ7swxgN9itcnSbO5sX1DXb/9Ioxp Q+4zSc1QXwxzCzjUarFZEnX8Wh0uDw+aP/U3n5sMfehDyHWcYIE9jaWzjimz3WrQ2J6KO IPZzRv/N2NWeXCxv0gMyK4MdnXQHHn9d65XO1arf5tqlCpQLQNpCWz36dI8aeGHQXnw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796258071; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Transfer-Encoding; bh=z7cMy2CamnIODWZtqQBi9reEyCNXqgK691X3lN43njw=; b=KK3O9i0Eqc63zLkCfM4TvhqhC6v60PaCZOAWB6MoOJ08iQ36LGTPMbxevMSW+D+Bjz+9 Ko4HJ4f469gnaSLHrcm+QTm+qKf6Jx9JAntVEPywgOsb0AVc58HG6lQyyPsdGiahquuIU JTeRw+lBlE8JIsjZvGDpyU5stQXvsjEQtGntm0lUNF6UYb0ZDLzbGhlsiBlRBUq5D4lOV oQKreRL5GKtquzgQkG3l+NR1y5j235GQZwSnwtcpvzhibbsnU4nIDIvcbucq5nUnGky4W nYdqjiZfQvxmJPLXdzrIEG8fAUdzB/6jhz+a6Adh9KBafYkL2y7YYLi9hvkuDhMufZw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nkE3N3SX; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91920606A322; Thu, 3 Dec 2026 00:34:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nkE3N3SX Received: by smtp.kernel.org (Postfix) with ESMTPSA id 576E11F000C1; Thu, 3 Dec 2026 00:34:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796258071; bh=z7cMy2CamnIODWZtqQBi9reEyCNXqgK691X3lN43njw=; h=From:To:Cc:Subject:Date; b=nkE3N3SXrV70GhPSrVOK0tjWp2DCloCgxB5V2fzZCt6hndzWkLq1pJj24/hPdKw1I X2I5SBGx1JwJfldD0e1EIGR35GoMMuLCR6N6HsSQqQc20SE61AE/+CZnmYFyRWNDOv U4uyV+yFCrUKDpgZq4iBNyGpphGIXgkkjsFxz0wHb1+TjRwaijOAql+Tr0tm+ffHTn /CkHAmlc751LB84sHBBb4NoNLXNJGSmMKGzd3NbAa7CADS8hSTg4TTSl6IyC/vDbZn Sd9uQmVKf5iwYgaU+QCrixXVqKFYFERLpI7fPWKubG6gGFYNZhiERxFdNwR7l99YGj jK4EoyrMUaCGQ== From: Sasha Levin To: Srinivas Kandagatla Cc: Bartosz Golaszewski , James Hilliard , Greg Kroah-Hartman , Mark Brown , Linux Next Mailing List , linux-kernel@vger.kernel.org Subject: [PATCH] nvmem: core: drop the leftover kfree(ops) from nvmem_unregister() Date: Wed, 2 Dec 2026 19:34:28 -0500 Message-ID: <20261203003428.2867091-1-sashal@kernel.org> X-Mailer: git-send-email 2.53.0 X-Mailing-List: linux-next@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit drivers/nvmem/core.c does not compile in the nvmem for-next branch: drivers/nvmem/core.c:1147:8: error: use of undeclared identifier 'ops' Commit 4508485e8156 ("nvmem: exclude disconnected providers from callback admission") moved the teardown of nvmem->ops from nvmem_unregister() to nvmem_disconnect(), which frees the operations itself, and removed the local variable. Commit 96139b973a2a ("nvmem: don't use devres in subsystem code") added a call to nvmem_sysfs_remove_cells() right above the old kfree(ops). The merge of the two kept both lines from the second side, kfree(ops) included. Remove it. nvmem_disconnect() has freed the operations by then. Fixes: 3a4c3aaebfe4 ("Merge branch 'nvmem-for-v7.5' into nvmem-for-next") Signed-off-by: Sasha Levin --- Based on nvmem for-next (3a4c3aaebfe4). Redoing the merge without the kfree(ops) line gives the same tree. linux-next is fine: the merge of the nvmem tree in next-20261202 drops the line. The fixes side is in char-misc-linus now, so the same conflict will come back when the v7.5 series is applied and the two meet. Built drivers/nvmem/core.o on x86_64 defconfig with clang 21, W=1. drivers/nvmem/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index b5af34e523b67..1b09f5ee27cae 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -1144,7 +1144,6 @@ void nvmem_unregister(struct nvmem_device *nvmem) nvmem_sysfs_remove_compat(nvmem); nvmem_destroy_layout(nvmem); nvmem_sysfs_remove_cells(nvmem); - kfree(ops); device_unregister(&nvmem->dev); } base-commit: 3a4c3aaebfe40cc8d6517b749920068fa7a9d9a0 -- 2.53.0