]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
nvmem: layouts: fix nvmem_layout_bus_uevent
authorWentao Guan <guanwentao@uniontech.com>
Fri, 14 Nov 2025 11:05:39 +0000 (11:05 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Nov 2025 17:08:10 +0000 (18:08 +0100)
correctly check the ENODEV return value.

Fixes: 810b790033cc ("nvmem: layouts: fix automatic module loading")
CC: stable@vger.kernel.org
Co-developed-by: WangYuli <wangyl5933@chinaunicom.cn>
Signed-off-by: WangYuli <wangyl5933@chinaunicom.cn>
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
Link: https://patch.msgid.link/20251114110539.143154-1-srini@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/layouts.c

index f381ce1e84bd37dc9bb5a6a4c45773d6aa4d9cb8..7ebe53249035e47d1cab0bfc4f68c7165ce7b003 100644 (file)
@@ -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;