summaryrefslogtreecommitdiff
path: root/drivers/core
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-19 02:08:51 (GMT)
committerSimon Glass <sjg@chromium.org>2017-06-01 13:03:05 (GMT)
commit01b120b6395d5be6fc0fb408df8bf8849c2c47b5 (patch)
treeb4613305e78d6d9b91534e289ae2525f32b30898 /drivers/core
parent0e513e788ff7df8c68525c8bf952eb9ef9ab7482 (diff)
downloadu-boot-fsl-qoriq-01b120b6395d5be6fc0fb408df8bf8849c2c47b5.tar.xz
dm: core: Set return value first in lists_bind_fdt()
Adjust the order to make it clear that *devp is set to NULL by default. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core')
-rw-r--r--drivers/core/lists.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index 23b6ba7..72c55e2 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -140,10 +140,10 @@ int lists_bind_fdt(struct udevice *parent, const void *blob, int offset,
int result = 0;
int ret = 0;
- name = fdt_get_name(blob, offset, NULL);
- dm_dbg("bind node %s\n", name);
if (devp)
*devp = NULL;
+ name = fdt_get_name(blob, offset, NULL);
+ dm_dbg("bind node %s\n", name);
compat_list = fdt_getprop(blob, offset, "compatible", &compat_length);
if (!compat_list) {