aboutsummaryrefslogtreecommitdiff
path: root/device_tree.c
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2013-06-10 22:12:25 +0200
committerMichael Tokarev <mjt@tls.msk.ru>2013-06-11 23:45:44 +0400
commit909a196d2754388d3b15a34b688095c655792124 (patch)
tree4a057f7257a5d4d4aa44f184096515eeabd0e055 /device_tree.c
parent8a3e8f7fd8144343f6c83e810b988c1e8a99d50a (diff)
downloadqemu-arm-909a196d2754388d3b15a34b688095c655792124.tar.gz
device tree: Fix cppcheck warning
Fix this cppcheck warning: Checking device_tree.c... device_tree.c:216: style: Checking if unsigned variable 'r' is less than zero. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'device_tree.c')
-rw-r--r--device_tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/device_tree.c b/device_tree.c
index 56af24b397..69be9da8e4 100644
--- a/device_tree.c
+++ b/device_tree.c
@@ -213,7 +213,7 @@ uint32_t qemu_devtree_get_phandle(void *fdt, const char *path)
uint32_t r;
r = fdt_get_phandle(fdt, findnode_nofail(fdt, path));
- if (r <= 0) {
+ if (r == 0) {
fprintf(stderr, "%s: Couldn't get phandle for %s: %s\n", __func__,
path, fdt_strerror(r));
exit(1);