From nobody Wed Dec 17 10:19:48 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19231274642; Fri, 9 May 2025 12:24:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746793457; cv=none; b=OzmioskrBcN8Kbcr2XWHHhQXuXXrlJ0Lv7CX6t8CvtwLXPWckd2t9PM01XW5avgChB+ZB44hWmKgd8ORn4J6obUmGiEmKwCvgaEM9jZfgmj/H4RPk75SGsbZGLhToi3oZiWbrveoC0FvhpHP+KXWbG22Dnaiy9+Dd+YeIp4MJLQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746793457; c=relaxed/simple; bh=VERcAVRj3d2dPrGdMrEq/G8EBTtz09HoiKnUvoWgwlc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IWR01hZSUpnLXlhN9fyxAhsCXSxl/zqWG7Yvm+fpfad9kjc7Iin/IbofltDiZtD20O/GXcKjwTS/WFZJhjV1/MOeHy/BloMCibXECzcH5Jz0LukiZVEDu/d1CX2OPABnQ1dAjGORBSQXmf7a7lQhimJsjVFl6zbhdfmyaJOJtbs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HyDsdNUD; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HyDsdNUD" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CED49C4CEEB; Fri, 9 May 2025 12:24:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1746793455; bh=VERcAVRj3d2dPrGdMrEq/G8EBTtz09HoiKnUvoWgwlc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HyDsdNUD7TTToYNtJzvoKYLn44k+RTCEjPRgwE5KdZFjBS+stfWLs0n6ABHS3mu77 lX5/gia/V0eS3HaadO2ny0dbzlqfBo3Y4p4obwdCg88NxjY8kHYnmTQwHNa2KUa3+9 876M35z1BsK7PayAf7aKPo6AQzXzZw0vc/ml6YZDZwONEWdg6NhatZSZzgsAQwQPyA ZgDToKkJf1cAJkF1vrRM9fT9rmBwtazKuktNB/4L4eeYNt6KWHMIlcQ/XLwn5c3ZKI RjxKxaS0Pp5MqNp45DhpIch7PeXMOf+7dGRXjLxKtwpsAfkmXqMZu+UY6mL/5PScBO 8xsYPySb4perw== From: srini@kernel.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Peter Korsgaard , stable@vger.kernel.org, Michal Simek , Srinivas Kandagatla Subject: [PATCH 2/2] nvmem: zynqmp_nvmem: unbreak driver after cleanup Date: Fri, 9 May 2025 13:24:07 +0100 Message-ID: <20250509122407.11763-3-srini@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250509122407.11763-1-srini@kernel.org> References: <20250509122407.11763-1-srini@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Peter Korsgaard Commit 29be47fcd6a0 ("nvmem: zynqmp_nvmem: zynqmp_nvmem_probe cleanup") changed the driver to expect the device pointer to be passed as the "context", but in nvmem the context parameter comes from nvmem_config.priv which is never set - Leading to null pointer exceptions when the device is accessed. Fixes: 29be47fcd6a0 ("nvmem: zynqmp_nvmem: zynqmp_nvmem_probe cleanup") Cc: stable@vger.kernel.org Signed-off-by: Peter Korsgaard Reviewed-by: Michal Simek Tested-by: Michal Simek Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/zynqmp_nvmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nvmem/zynqmp_nvmem.c b/drivers/nvmem/zynqmp_nvmem.c index 8682adaacd69..7da717d6c7fa 100644 --- a/drivers/nvmem/zynqmp_nvmem.c +++ b/drivers/nvmem/zynqmp_nvmem.c @@ -213,6 +213,7 @@ static int zynqmp_nvmem_probe(struct platform_device *p= dev) econfig.word_size =3D 1; econfig.size =3D ZYNQMP_NVMEM_SIZE; econfig.dev =3D dev; + econfig.priv =3D dev; econfig.add_legacy_fixed_of_cells =3D true; econfig.reg_read =3D zynqmp_nvmem_read; econfig.reg_write =3D zynqmp_nvmem_write; --=20 2.43.0