From: Michal Simek <michal.simek@amd.com>
To: Peter Korsgaard <peter@korsgaard.com>,
Praveen Teja Kundanala <praveen.teja.kundanala@amd.com>,
Kalyani Akula <kalyani.akula@amd.com>,
Srinivas Kandagatla <srini@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] nvmem: zynqmp_nvmem: unbreak driver after cleanup
Date: Tue, 29 Apr 2025 12:04:40 +0200 [thread overview]
Message-ID: <99d29701-6257-42bf-a1c4-1707c3eb54c1@amd.com> (raw)
In-Reply-To: <20250422142112.2364822-1-peter@korsgaard.com>
On 4/22/25 16:21, Peter Korsgaard wrote:
> 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 <peter@korsgaard.com>
> ---
> Changes since v1:
> - Cc stable
>
> 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 8682adaacd692..7da717d6c7faf 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 *pdev)
> econfig.word_size = 1;
> econfig.size = ZYNQMP_NVMEM_SIZE;
> econfig.dev = dev;
> + econfig.priv = dev;
> econfig.add_legacy_fixed_of_cells = true;
> econfig.reg_read = zynqmp_nvmem_read;
> econfig.reg_write = zynqmp_nvmem_write;
Reviewed-by: Michal Simek <michal.simek@amd.com>
Tested-by: Michal Simek <michal.simek@amd.com>
Thanks,
Michal
next prev parent reply other threads:[~2025-04-29 10:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 14:21 Peter Korsgaard
2025-04-29 10:04 ` Michal Simek [this message]
2025-04-29 20:07 ` Srinivas Kandagatla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=99d29701-6257-42bf-a1c4-1707c3eb54c1@amd.com \
--to=michal.simek@amd.com \
--cc=gregkh@linuxfoundation.org \
--cc=kalyani.akula@amd.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@korsgaard.com \
--cc=praveen.teja.kundanala@amd.com \
--cc=srini@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®