summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-11-17 17:19:39 +0900
committerSimon Glass <sjg@chromium.org>2014-11-22 10:16:48 +0100
commit84a71537333e05b920a5679b4b18d61fc925fefa (patch)
tree37c0e15a0e9a5291664e3611e39f4cd532c33269 /drivers
parentcbf86d719817c8adcd45a85ae84cd305bf835a42 (diff)
downloadu-boot-imx-84a71537333e05b920a5679b4b18d61fc925fefa.zip
u-boot-imx-84a71537333e05b920a5679b4b18d61fc925fefa.tar.gz
u-boot-imx-84a71537333e05b920a5679b4b18d61fc925fefa.tar.bz2
dm: core: remove meaningless if conditional
If the variable "ret" is equal to "-ENOENT", it is trapped at [1] and never reaches [2]. At [3], the condition "ret != -ENOENT" is always true. if (ret == -ENOENT) { <------------------ [1] continue; } else if (ret == -ENODEV) { dm_dbg("Device '%s' has no compatible string\n", name); break; } else if (ret) { <------------------ [2] dm_warn("Device tree error at offset %d\n", offset); if (!result || ret != -ENOENT) <------------------ [3] result = ret; break; } Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/core/lists.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index 7a1d660..3a1823d 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -164,8 +164,7 @@ int lists_bind_fdt(struct udevice *parent, const void *blob, int offset,
break;
} else if (ret) {
dm_warn("Device tree error at offset %d\n", offset);
- if (!result || ret != -ENOENT)
- result = ret;
+ result = ret;
break;
}