dm: core: Display the error number when driver binding fails
authorSimon Glass <sjg@chromium.org>
Sun, 17 Jan 2016 23:11:06 +0000 (16:11 -0700)
committerBin Meng <bmeng.cn@gmail.com>
Sun, 24 Jan 2016 04:07:18 +0000 (12:07 +0800)
This is often -96 (-EPFNOSUPPORT) which indicates that the uclass is not
compiled in. Display the error number to make this easier to spot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
drivers/core/lists.c

index a1c94780dd31d977c1823958a0539d5af261f25b..c4fc216340d8169dde8c05cdc0f9556e7ed9815b 100644 (file)
@@ -172,7 +172,8 @@ int lists_bind_fdt(struct udevice *parent, const void *blob, int offset,
                dm_dbg("   - found match at '%s'\n", entry->name);
                ret = device_bind(parent, entry, name, NULL, offset, &dev);
                if (ret) {
-                       dm_warn("Error binding driver '%s'\n", entry->name);
+                       dm_warn("Error binding driver '%s': %d\n", entry->name,
+                               ret);
                        return ret;
                } else {
                        dev->driver_data = id->data;