[PATCH] nvmem: layouts: fix nvmem_layout_bus_uevent

From: srini

Date: Fri Nov 14 2025 - 06:05:55 EST


From: Wentao Guan <guanwentao@xxxxxxxxxxxxx>

correctly check the ENODEV return value.

Fixes: 810b790033cc ("nvmem: layouts: fix automatic module loading")
CC: stable@xxxxxxxxxxxxxxx
Co-developed-by: WangYuli <wangyl5933@xxxxxxxxxxxxxx>
Signed-off-by: WangYuli <wangyl5933@xxxxxxxxxxxxxx>
Signed-off-by: Wentao Guan <guanwentao@xxxxxxxxxxxxx>
Signed-off-by: Srinivas Kandagatla <srini@xxxxxxxxxx>
---
Hi Greg,

There is only one nvmem fix in this cycle,
Can you pl pick this fix for 6.18 release.

thanks,
--srini

drivers/nvmem/layouts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvmem/layouts.c b/drivers/nvmem/layouts.c
index f381ce1e84bd..7ebe53249035 100644
--- a/drivers/nvmem/layouts.c
+++ b/drivers/nvmem/layouts.c
@@ -51,7 +51,7 @@ static int nvmem_layout_bus_uevent(const struct device *dev,
int ret;

ret = of_device_uevent_modalias(dev, env);
- if (ret != ENODEV)
+ if (ret != -ENODEV)
return ret;

return 0;
--
2.51.0