nvmem: Do not expect fixed layouts to grab a layout driver
[platform/kernel/linux-starfive.git] / drivers / nvmem / core.c
index eaf6a3f..5b3955a 100644 (file)
@@ -796,6 +796,12 @@ static struct nvmem_layout *nvmem_layout_get(struct nvmem_device *nvmem)
        if (!layout_np)
                return NULL;
 
+       /* Fixed layouts don't have a matching driver */
+       if (of_device_is_compatible(layout_np, "fixed-layout")) {
+               of_node_put(layout_np);
+               return NULL;
+       }
+
        /*
         * In case the nvmem device was built-in while the layout was built as a
         * module, we shall manually request the layout driver loading otherwise