mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
8a3e8f7fd8
commit
909a196d27
|
@ -213,7 +213,7 @@ uint32_t qemu_devtree_get_phandle(void *fdt, const char *path)
|
||||||
uint32_t r;
|
uint32_t r;
|
||||||
|
|
||||||
r = fdt_get_phandle(fdt, findnode_nofail(fdt, path));
|
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__,
|
fprintf(stderr, "%s: Couldn't get phandle for %s: %s\n", __func__,
|
||||||
path, fdt_strerror(r));
|
path, fdt_strerror(r));
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
Loading…
Reference in New Issue