提交 909a196d 编写于 作者: S Stefan Weil 提交者: Michael Tokarev

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: NStefan Weil <sw@weilnetz.de>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 8a3e8f7f
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册