Skip to contentSkip to conversation

nvmem: zynqmp_nvmem: unbreak driver after cleanup

PATCH In review Ivan Vera 3 participants 5 messages Nov 5, 2025 – Nov 6, 2025

Subsystems (4)
lore
Share & tools
lore

Ivan Vera

author
#0 lore raw

PATCH 1/1 nvmem: zynqmp_nvmem: unbreak driver after cleanup

From: Peter Korsgaard <[email protected]>

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")

State: upstream (c708bbd57d158d9f20c2fcea5bcb6e0afac77bef)

(cherry picked from commit 94c91acb3721403501bafcdd041bcd422c5b23c4)
---
 drivers/nvmem/zynqmp_nvmem.c | 1 +
 1 file changed, 1 insertion(+)
drivers/nvmem/zynqmp_nvmem.c +1 -0
index 68c51cc3efa1..0f308e53d82f 100644
@@ -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;
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 8 lines · Ivan Vera

From: Peter Korsgaard <[email protected]>

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.

Quoted 8 lines
Fixes 29be47fcd6a0 ("nvmem: zynqmp_nvmem: zynqmp_nvmem_probe cleanup")

State: upstream (c708bbd57d158d9f20c2fcea5bcb6e0afac77bef) (cherry picked from commit 94c91acb3721403501bafcdd041bcd422c5b23c4)

Neither of these git ids are valid, where did you get them from?

thanks,

greg k-h

#2 lore raw
Quoted 20 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Greg" == Greg KH <[email protected]> writes:

Quoted 8 lines · Ivan Vera

From: Peter Korsgaard <[email protected]>

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.

Quoted 8 lines
Fixes 29be47fcd6a0 ("nvmem: zynqmp_nvmem: zynqmp_nvmem_probe cleanup")

State: upstream (c708bbd57d158d9f20c2fcea5bcb6e0afac77bef) (cherry picked from commit 94c91acb3721403501bafcdd041bcd422c5b23c4)

Quoted 1 line

Neither of these git ids are valid, where did you get them from?

git describe --contains c708bbd57d158d9f20c2fcea5bcb6e0afac77bef next-20250505~21^2~1^2

I guess it should have been fe8abdd175d7b547ae1a612757e7902bcd62e9cf instead, E.G. what ended up in master?

Signature · 1 line
Bye, Peter Korsgaard
maintainer
#3 lore raw
Quoted 20 lines · Peter Korsgaard
Quoted 19 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Greg" == Greg KH <[email protected]> writes:

Quoted 16 lines · Ivan Vera

From: Peter Korsgaard <[email protected]>

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")

State: upstream (c708bbd57d158d9f20c2fcea5bcb6e0afac77bef) (cherry picked from commit 94c91acb3721403501bafcdd041bcd422c5b23c4)

Quoted 7 lines
Quoted 1 line

Neither of these git ids are valid, where did you get them from?

git describe --contains c708bbd57d158d9f20c2fcea5bcb6e0afac77bef next-20250505~21^2~1^2

I guess it should have been fe8abdd175d7b547ae1a612757e7902bcd62e9cf instead, E.G. what ended up in master?

We can't take stuff in stable unless it is in Linus's tree.

thanks,

greg k-h

#4 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Greg" == Greg KH <[email protected]> writes:

Hi,

Quoted 9 lines
Quoted 7 lines
Quoted 1 line

Neither of these git ids are valid, where did you get them from?

git describe --contains c708bbd57d158d9f20c2fcea5bcb6e0afac77bef next-20250505~21^2~1^2

I guess it should have been fe8abdd175d7b547ae1a612757e7902bcd62e9cf instead, E.G. what ended up in master?

We can't take stuff in stable unless it is in Linus's tree.

Sure, it was apparently just the wrong commit hash used, E.G.:

git describe --contains fe8abdd175d7b547ae1a612757e7902bcd62e9cf v6.16-rc1~30^2~32

Signature · 1 line
Bye, Peter Korsgaard