device tree: Fix cppcheck warning
PATCH 1/1 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 <[email protected]>
--- device_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
device_tree.c +1 -1
@@ -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 );
Signature · 1 line
1.7.10.4