]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: syscon: Fix calling dev_dbg with an uninitialized device
authorSean Anderson <seanga2@gmail.com>
Tue, 15 Sep 2020 14:44:37 +0000 (10:44 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 30 Sep 2020 12:52:14 +0000 (08:52 -0400)
We can't use dev_dbg here because we haven't bound to the device yet. Use
log_debug instead.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>
drivers/core/syscon-uclass.c

index 9cbda4ebdae6b9f64139b6e69e8066ed71bdb6c4..5be1d527a0a711c0f03365e556d0a8b899af1997 100644 (file)
@@ -70,7 +70,7 @@ static int syscon_probe_by_ofnode(ofnode node, struct udevice **devp)
 
        /* found node with "syscon" compatible, not bounded to SYSCON UCLASS */
        if (!ofnode_device_is_compatible(node, "syscon")) {
-               dev_dbg(dev, "invalid compatible for syscon device\n");
+               log_debug("invalid compatible for syscon device\n");
                return -EINVAL;
        }